Why ? qt-opensource-windows-x86-5.11.1.exe is not build with "-opengl desktop" option
Solved
General and Desktop
-
I use the QOpenGlWidget with the set QOpenGLFunctions_2_0 however it gives an error executing and the program closes, saying that
the statement is not compatible with angle opengl es. The question is, why is the version for windows compiled in OpenGL ES mode?I need to compile the qt with the -opengl desktop option to work.
Is there any other solution or just compiling Qt sources?
func = QOpenGLContext:: currentContext()->versionFunctions<QOpenGLFunctions_2_0>(); //---------------------------------- // Inicialização do OPENGL func->glClearColor(0.0f, 0.0f, 0.0f, 1.0f); func->glShadeModel(GL_SMOOTH); func->glEnable(GL_DEPTH_TEST); func->glEnable(GL_BLEND); func->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); func->glEnable(GL_ALPHA_TEST); func->glAlphaFunc(GL_GEQUAL, static_cast<GLclampf>(0.1)); //---------------------------------- // Filtro Antialias func->glEnable(GL_LINE_SMOOTH); func->glEnable(GL_BLEND); func->glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); func->glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE); //---------------------------------- // Define Light's GLfloat lightAmbient[] = { 1.00f, 1.00f, 1.00f, 1.00f }; GLfloat lightDiffuse[] = { 1.00f, 1.00f, 1.00f, 1.00f }; GLfloat lightPosition[] = { -0.40f, 0.40f, -2.00f, 1.00f }; func->glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient); // Setup The Ambient Light func->glLightfv(GL_LIGHT0, GL_DIFFUSE, lightDiffuse); // Setup The Diffuse Light func->glLightfv(GL_LIGHT0, GL_POSITION, lightPosition); // Position The Light func->glDisable(GL_LIGHT0); func->glDisable(GL_LIGHTING);
-
Hi
just speculating.
Its not related to ?
http://blog.qt.io/blog/2014/11/27/qt-weekly-21-dynamic-opengl-implementation-loading-in-qt-5-4/
and it fails to detect the desktop openGL ?
It seems you can use Qt::AA_UseDesktopOpenGL
before creating QApplication and it should use that. -
Thanks... it's work. Greatest !