Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
OpenGL Desktop or ES?
I´m using in my software the QOpenGLFunctions_Major_Minor objects to properly handle the openGL functions being used and suported by the system.
But in some cases my system will run in other platforms that OpenGL ES are used and not the desctop version.
How can i identify dinamically in the system if a OpenGL context was oppened with a Desktop or using the ES version of the OpenGL driver?
agocs last edited by
It is you (your application) that requests a given OpenGL version and profile so it should be clear what the application is targetting.
To be fully portable you will need to limit yourself to OpenGL 2.0 and OpenGL ES 2.0. But then there will be no point in using the versioned wrappers in the first place, instead, QOpenGLFunctions serves you just fine.
I´m opening a Context and seeing what version are supported by the client hardware, and my system dinamically "fit" all the system model to work on the machine for this specific hardware, and all is working lovely including when a machine have Shaders support or not.
In other words my system are using the functions and dinamically setting all the avaliable objects and funtionalities with no problem, including with this i can , for example request my system work in compatibility mode (to access the fixed pipeline or not) , i can force a specific version too, but i want a system that work in ALL implementations of OpenGL and not only in a specific version...
All is working really fine and fast and actually my engine works dinamically in all openGL versions (From 1.0 to 4.3)including mapping compatibility versions and core versions..
Now i want my system detect if the hardware where the system are running is a OpenGL ES implementation or Not.
There is no sense to fix a specific version of OpenGL becouse the real "One Project for all platforms" go down...
I Usually use this approach in the past...but with this objects of Qt mapping all versions of OpenGL at our disposal is Simply great!
Again, if i have the same widget , same window, same OpenGLContext etc...for all platforms...there is no function that identify the hardware where the context was oppened is an OpenGL ES or Not?
agocs last edited by
You could check context->format().renderableType() after calling create(). At that point it will contain either QSurfaceFormat::OpenGL or QSurfaceFormat::OpenGLES.
I will check it out!
Thanks so much agocs!