Code review comment for lp:~compiz-linaro-team/compiz/gles2

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Some things to change after using the API for a bit:

1. GLVertexBuffer::streamingBuffer () is used almost everywhere as a singleton, this makes it difficult to mock out for testing. In addition, fraught with problems to do with shared usage
2. GLVertexBuffer::begin () and GLVertexBuffer::end () need to be renamed to something else as they can confuse the standard library
3. GLVertexBuffer::setAutoProgram needs to go away - the parameter needs to be a part of the constructor, as normal usage of GLVertexBuffer will crash if you don't call setAutoProgram.
4. The usage of va_args in Uniform is not nice, but necessary as it stands - could be replaced with variadic templates
5. GLVertexBuffer::setUniform (GLfloat *) will work but silently fail - it makes a lot of sense to be able to pass an array to setUniform for the purposes of setting a vec4 in a shader. Perhaps an overload specifying the size would make sense?

« Back to merge proposal