Created attachment 497211 [details] [diff] [review] Unbind Quad VBO On attempt to render mozilla layout with OGL Manager togeter with Qt/Meego toolkit items (statusbar, FPS renderer, and other possible items on QGraphicsScene) I see this error: PVR:Aborting: Offset to VBO out of bounds. Likely an app bug in glVertexAttribPointer! Comment from internal bugzilla: ************** The error message you're getting indicates that the app is trying use geometry from a vertex buffer object (VBO) with an offset that goes beyond the end of the buffer. The most common cause for this is forgetting to unbind a VBO before using a client-side vertex attribute array. For example: glVertexAttribPointer(attr, 3, GL_FLOAT, GL_FALSE, 0, &someArray); should be glBindBuffer(GL_ARRAY_BUFFER, 0); glVertexAttribPointer(attr, 3, GL_FLOAT, GL_FALSE, 0, &someArray); This is because if a vertex buffer object is bound when glVertexAttribPointer is called, the last parameter is interpreted as an offset into the VBO instead of an absolute memory pointer. **************
Comment on attachment 497211 [details] [diff] [review] Unbind Quad VBO ugh. this is a Qt bug, but we have to work around it (if it depends on GL state, it should set that state!). No need for an UnbindQuadVBO function, it's got nothing to do with the Quad VBO. We should bind buffer 0 again at the end of Initialize (like you have), and also at the end of Render. No need to bind it at the end of every quad draw, and in fact that'll be pretty expensive. (We actually want to do even fewer state changes in there, but at some point we'll want to add state tracking to GLContext to do that). We shouldn't ever have Qt GL rendering in the middle of our own rendering, so as long as we return a GL state back to Qt, we should be fine.
This longer happens, so I assume it got fixed through returning consistent state.
Created attachment 574772 [details] [diff] [review] Another version of patch, frontend only Problem still exists, and I see it from time to time. Also this API needed for native Embedding, right after EndTransaction we must unbind vbo in order to get it working in embedding context
Created attachment 574977 [details] [diff] [review] Unbind VBO, Addressed vlad comments
Comment on attachment 574977 [details] [diff] [review] Unbind VBO, Addressed vlad comments mwoodrow says this is fine.
Created attachment 575683 [details] [diff] [review] Missing returns that also need unbind VBO Forgot about earlier returns which also needs UnbindVBO
Need to land additional patch