OpenGL 4.3 and Qt 5.3 - Doesn't display the rendered elements
-
Hi all,
I'm struggling with an issue, where I am trying to move to OpenGL 4.3, try the new tesselation shaders and all that good jazz, but I can't make a simple triangle working. Mind you, I went through the tutorial of the OpenGL window and worked fine. After that I moved on to do something more complicated, and worked as expected.
But the moment I tried to switch to OGL 4.3 (via QOpenGLFunctions_4_3_Core), something went wrong. Basically, I'm using the versionFunctions<QOpenGLFunctions_4_3_Core>() instead of simply subclass from the QOpenGLFunctions as in the mentioned example. And after that I use the pointer I was given to render.
The funny thing is, that when I use apitrace and replay the trace file, it looks just fine. Also, the glClearColor and glClear works as expected, but I can't get to see the results of the DrawArray calls for some reason in the actual application. I'm at complete loss.
"Here's":https://www.dropbox.com/s/inc2zcksiok5ppz/OGL4Test.zip a simple program that is based on the OpenGL window example, except for the fact that I'm trying to use the OpenGL 4.3 version functions and I didn't do any abstraction from the window.
Also "here's":https://www.dropbox.com/s/yj0hl6j57qx96ci/OGL4Test.5.trace the resulting trace file, which, if you try it on your machine, should produce a triangle (it does on my machine).
-
[quote author="agocs" date="1403619040"]You will need a vertex array object bound when using a core profile. See QOpenGLVertexArrayObject.[/quote]
Is it a requirement in GL4? I was under the impression that it is an optional way to bind the vertex attributes.