The original use of a std::vector<> was a little suspicious, since .size () was always 0 during use. This was confusing while debugging.
The size 4 is hardcoded in several places, and the vector was not really resizeable, so use a plain old array instead. Signed-off-by: Pekka Paalanen <[email protected]> --- plugins/opengl/src/privatevertexbuffer.h | 2 +- plugins/opengl/src/vertexbuffer.cpp | 2 -- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/plugins/opengl/src/privatevertexbuffer.h b/plugins/opengl/src/privatevertexbuffer.h index 71a2bcb..bcab776 100644 --- a/plugins/opengl/src/privatevertexbuffer.h +++ b/plugins/opengl/src/privatevertexbuffer.h @@ -64,7 +64,7 @@ class PrivateVertexBuffer GLuint vertexBuffer; GLuint normalBuffer; GLuint colorBuffer; - std::vector<GLuint> textureBuffers; + GLuint textureBuffers[4]; }; #endif //_VERTEXBUFFER_PRIVATE_H diff --git a/plugins/opengl/src/vertexbuffer.cpp b/plugins/opengl/src/vertexbuffer.cpp index 5479258..02a2ff8 100644 --- a/plugins/opengl/src/vertexbuffer.cpp +++ b/plugins/opengl/src/vertexbuffer.cpp @@ -224,8 +224,6 @@ PrivateVertexBuffer::PrivateVertexBuffer () : GL::genBuffers (1, &vertexBuffer); GL::genBuffers (1, &normalBuffer); GL::genBuffers (1, &colorBuffer); - - textureBuffers.reserve (4); GL::genBuffers (4, &textureBuffers[0]); } -- 1.7.3.4 _______________________________________________ dev mailing list [email protected] http://lists.compiz.org/mailman/listinfo/dev
