>>> 2) An QOpenGLVertexArrayObject class. This would be just a thin wrapper >>> around a VAO with possibly some API to make it easier to use with >>> QOpenGLBuffer and QOpenGLShaderProgram. >>> >>> This could potentially find use in QtQuick 2 so putting it in QtGui >>> alongside the other QOpenGL* classes makes sense. I think the lack of >>> VAO's in qtdeclarative is what makes it necessary to still use a >>> compatibility profile with QtQuick 2. This limits the GL features we can >>> use in conjunction with QQ2 on Mac as Apple only implement the Core >>> Profile for GL 3.x. That is another story though. >> >> Could you elaborate on this problem? I'm not familiar with it? > > When I was preparing my devdays talk on rendering an OpenGL underlay with QQ2 > UI over the top I managed to get it working with a standard OpenGL 2.x > context > no problem. > > When I wanted to do something more fancy with instanced rendering I needed an > OpenGL 3.3 context. Trying this out I found that it works fine with a > Compatibility profile context. However, using a Core profile context resulted > in no QQ2 elements being drawn. > > I suspect it's due to QQ2 using indexed draw calls but not using vertex array > objects which are compulsory in the Core profile since the index buffer is > contained in a VAO (whereas the VBOs are just referenced). > > I need to find time to do a quick test to see if this is actually the case. > The test could just be creating a single VAO and binding it up front when the > SG context is initialized. That way all index buffer changes affect this > default VAO.
Thanks for explaining. No need to test, I can confirm that we use index draw calls and no VAO in the default renderer (and also in the overlaprenderer in playground/scenegraph). We'll fix that once the enablers are in. cheers, Gunnar _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
