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

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Nice idea, but you'd still end up with lots of ugly plugin code which does:

gWindow->clearVertices();
gWindow->vertexBuffer()->blah();
gWindow->vertexBuffer()->blah2();
gWindow->vertexBuffer()->blah3();
gWindow->saveVertices();

We cannot get away from the fact that plugins need direct access to a GLVertexBuffer; GLWindow::vertexBuffer(). In the same way that they use GLWindow::Geometry on trunk; GLWindow::geometry().

However this is not really an issue at all. If you want the plugin code to be nicer, just write it nicer:

GLVertexBuffer *vb = gWindow->vertexBuffer();
vb->begin();
vb->blah();
vb->blah2();
vb->blah3();
vb->end();

« Back to merge proposal