aboutsummarylogtreecommitdiffstats
path: root/vertexbuffer-crash-fix.patch
blob: c55fd5098c5dee320b30986b0cbb8e55f5227fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
diff --git a/plugins/opengl/CMakeLists.txt b/plugins/opengl/CMakeLists.txt
index 63db12b..2fc6046 100644
--- a/plugins/opengl/CMakeLists.txt
+++ b/plugins/opengl/CMakeLists.txt
@@ -21,7 +21,7 @@ include_directories (src/glxtfpbind/include)
 else (USE_GLES)
     find_package (OpenGL)
     if (OPENGL_FOUND)
-	compiz_plugin(opengl PLUGINDEPS composite LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY} ${INTERNAL_LIBRARIES} dl INCDIRS ${OPENGL_INCLUDE_DIR})
+	compiz_plugin(opengl PLUGINDEPS composite LIBRARIES ${OPENGL_LIBRARIES} ${INTERNAL_LIBRARIES} dl INCDIRS ${OPENGL_INCLUDE_DIR})
     endif (OPENGL_FOUND)
 endif (USE_GLES)
 
diff --git a/cmake/plugin_extensions/CompizOpenGLFixups.cmake b/cmake/plugin_extensions/CompizOpenGLFixups.cmake
index 8691371..f230ceb 100644
--- a/cmake/plugin_extensions/CompizOpenGLFixups.cmake
+++ b/cmake/plugin_extensions/CompizOpenGLFixups.cmake
@@ -4,7 +4,7 @@ if (${COMPIZ_CURRENT_PLUGIN} STREQUAL "opengl")
     if (USE_GLES)
 	set (PKGCONFIG_LIBS "${OPENGL_egl_LIBRARY} -lGLESv2")
     else (USE_GLES)
-	set (PKGCONFIG_LIBS "${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}")
+	set (PKGCONFIG_LIBS "${OPENGL_LIBRARIES}")
     endif (USE_GLES)
 endif (${COMPIZ_CURRENT_PLUGIN} STREQUAL "opengl")
 
diff --git a/plugins/opengl/compiz-opengl.pc.in b/plugins/opengl/compiz-opengl.pc.in
index d8b0b79..12c55c7 100644
--- a/plugins/opengl/compiz-opengl.pc.in
+++ b/plugins/opengl/compiz-opengl.pc.in
@@ -8,5 +8,5 @@ Description: Opengl compositing plugin for compiz
 Version: @VERSION@
 
 Requires: compiz compiz-composite
-Libs: @PKGCONFIG_LIBS@ -L${libdir} -lopengl
+Libs: -lGL -L${libdir} -lopengl
 Cflags: @COMPIZ_CFLAGS@ -I${includedir}/compiz
\ No newline at end of file
diff --git a/plugins/opengl/src/screen.cpp b/plugins/opengl/src/screen.cpp
index fcf19ca..39bf966 100644
--- a/plugins/opengl/src/screen.cpp
+++ b/plugins/opengl/src/screen.cpp
@@ -40,6 +40,7 @@
 
 #include <dlfcn.h>
 #include <math.h>
+#include <GL/glx.h>
 
 using namespace boost::placeholders;
 
@@ -1354,8 +1355,7 @@ GLScreen::GLScreen (CompScreen *s) :
 	GL::bufferAge = true;
     }
 
-    priv->getProcAddress = (GL::GLXGetProcAddressProc)
-	getProcAddress ("glXGetProcAddressARB");
+    priv->getProcAddress = &glXGetProcAddressARB;
     GL::bindTexImage = (GL::GLXBindTexImageProc)
 	getProcAddress ("glXBindTexImageEXT");
     GL::releaseTexImage = (GL::GLXReleaseTexImageProc)
diff --git a/plugins/opengl/src/vertexbuffer.cpp b/plugins/opengl/src/vertexbuffer.cpp
index b102016..4e314c2 100644
--- a/plugins/opengl/src/vertexbuffer.cpp
+++ b/plugins/opengl/src/vertexbuffer.cpp
@@ -164,7 +164,7 @@ void GLVertexBuffer::addVertices (GLuint nVertices, const GLfloat *vertices)
 
 GLfloat *GLVertexBuffer::getVertices() const
 {
-    return &priv->vertexData[0];
+    return priv->vertexData.data();
 }
 
 int GLVertexBuffer::getVertexStride() const