Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why ? qt-opensource-windows-x86-5.11.1.exe is not build with "-opengl desktop" option
QtWS25 Last Chance

Why ? qt-opensource-windows-x86-5.11.1.exe is not build with "-opengl desktop" option

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 394 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • joaopagottoJ Offline
    joaopagottoJ Offline
    joaopagotto
    wrote on last edited by joaopagotto
    #1

    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);
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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.

      1 Reply Last reply
      5
      • joaopagottoJ Offline
        joaopagottoJ Offline
        joaopagotto
        wrote on last edited by
        #3

        Thanks... it's work. Greatest !

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved