How to work in openGL 1.1
I develop an application using opengl.
It works well on desktop but the application must also
work on TSE server which use only opengl 1.1.
For now my application display black screen in TSE.
How can I use openGL 1.1 in QOpenGLWidget ?
I don't think you can use QOpenGLWidget for OpenGL 1.1. The earlier widget, QGLWidget, will work though.
I recently was looking into a problem myself using the newer QOpenGLWidget and found issues when running on an older OS that only supported OpenGl 1.x. There was an error message on the console related to compiling the vertex shader (which I wasn't using at that time so this was internal somewhere) followed by a crash.
To work around this there were two options I came up with:
- Test what version of OpenGL is available and disable anything related to OpenGL when older than version 2.x
- use QGLWidget.
I chose the second option (even though this widget is depreciated) as it is more likely to work across more systems. The downside is that it has some quirks which I believe the newer QOpenGLWidget addresses but it does work.
I have modified my application to work with QGLWidget if I can't create an QOpenGLContext.
It works quite well (on my pc) if I force my application to use QGLWidget.
But If I try on TSE server my QGLWidget is never refreshed, it seems paintGL is never called, worse I think QGLContext can't be created.
(I'm not sure because I can't debug on TSE for now).
That's weird because an old MFC application uses openGL 1.1 on this server.
What I've missed ?
Sorry for my horrible english.