PDA

View Full Version : qtopengl es 3.0 support



PeterVE
31st August 2016, 16:16
Hello and thank you for stopping by.

imx6q
qt 5.7
3.14.52

I have an error in my qtopengl code that has to do with versioning. It seems qt supports opengl es 2.0 without question (for me anyways). I have queried the hardware and here is the results...


Opengl vendor 'Vivante Corporation'
renderer 'Vivante GC2000'
version 'OpenGL ES 3.0 V5.0.11.p7.33433'

12 hardware units can access texture data from vertex and fragment processors
8 hardware units can access texture data from fragment processors
4 hardware units can access texture data from vertex processors
4 hardware units can access texture data from vertex processors

This means that I should be able to write es 3.0 vertex and fragment shaders and use the es 3.0 APIs to compile such things. Compiling the first shader gives me an error.


(2:0) : error : syntax error at 'layout'

What I have figured out is that the built rootfs has opengl libs for gles2 and i am assuming what I want is gles3. So there is the question(s)...

As my hardware supports 3.0 and it seems qt does support the 3.0 and well beyond functions, how am I supposed to get the correct rootfs files as well as my Qt project on my host to support opengl 3.0?

info::

1) my .pro does have "QT += gui"

2) in a .h file

#include <QOpenGLFunctions_3_0>
#include <GLES3/gl3.h>

3) in a .h file

class myClass : public QObject, protected QOpenGLFunctions // works
class myClass : public QObject, protected QOpenGLFunctions_3_0 // does not work

4) same .h file without the class definition error

class myClass : public QObject, protected QOpenGLFunctions // works
protected:
QOpenGLFunctions_3_0* m_ogl300Funcs; // "error: 'QOpenGLFunctions_3_0' does not name a type QOpenGLFunctions_3_0* m_ogl300Funcs;"

I am unsure how Qt shows to have all of this opengl version support as well as my hardware but yet I can't use it. Stop teasing, please. 8^)




Added after 13 minutes:

I found this is the answer...QOpenGLExtraFunctions.

Unless someone has other pointers, I think this is what I am seeing is the answer.