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. [Solved] glBindBufferRange not found
Forum Updated to NodeBB v4.3 + New Features

[Solved] glBindBufferRange not found

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 3.3k Views 1 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to devnet,

    Are you sure you have the latest version of you graphic card driver ?

    By the way, what version of Qt/OS combo are you using ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • T Offline
      T Offline
      the_shedding_reptile
      wrote on last edited by
      #3

      Thank you!

      Sorry for not being more specific.
      OS: Windows 8.1 Pro
      Qt: 5.4 x64
      I have the latest driver and the card supports OpenGL 4.4 (AMD Radeon 290X).
      I checked the OpenGL context with the versionFunctions() function and it returns the header corresponding to the context I requested. So the function should be there.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Can you post the code you are using to setup OpenGL ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • T Offline
          T Offline
          the_shedding_reptile
          wrote on last edited by
          #5

          Sure:
          The OpenGL window inherits from QWindow and is initialized as follows:

          @ QSurfaceFormat format;

          format.setSamples(16);
          format.setDepthBufferSize(24);
          format.setMajorVersion(4);
          format.setMinorVersion(0);
          format.setProfile(QSurfaceFormat::CoreProfile);
          format.setOption(QSurfaceFormat::DebugContext);
          
          glWindow = new OpenGLWindow;
          glWindow->setFormat(format);
          glWindow->setAnimating(true);@
          

          The class is declared with
          @class OpenGLWindow : public QWindow, protected QOpenGLFunctions@

          The header for OpenGL functions included is
          @#include <QOpenGLFunctions>@

          I hope this helps.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Aren't you missing something like:

            @
            void OpenGLWindow::initializeGL()
            {
            m_context->makeCurrent(this);
            initializeOpenGLFunctions();
            }@

            ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • T Offline
              T Offline
              the_shedding_reptile
              wrote on last edited by
              #7

              I have that in the renderNow function:

              @void OpenGLWindow::renderNow()
              {
              if(!isExposed())
              {
              return;
              }

              bool needsInitialize = false;
              
              if(!context)
              {
                  context = new QOpenGLContext(this);
                  context->setFormat(requestedFormat());
                  context->create();
              
                  needsInitialize = true;
              }
              
              context->makeCurrent(this);
              
              if(needsInitialize)
              {
                  initializeOpenGLFunctions();
                  initialize();
              }
              
              render();
              
              context->swapBuffers(this);
              
              if(isAnimating)
              {
                  renderLater();
              }
              

              }@

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                Doesn't look like the recommended way to setup a QOpenGLWidget

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  the_shedding_reptile
                  wrote on last edited by
                  #9

                  It's not, because it's not a QOpenGLWidget. It's a QWindow. I did mention that. See here: "OpenGL Window Example":http://doc.qt.io/qt-5/qtgui-openglwindow-example.html.
                  Anyway, this has nothing to do with initialization, that error is an include error.

                  1 Reply Last reply
                  0
                  • Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @
                    class OpenGLWindow : public QWindow, protected QOpenGLFunctions
                    @
                    QOpenGLFunctions exposes only the OpenGL ES 2.0 API.
                    glBindBufferRange is not part of it. It is part of OpenGL ES 3.0, OpenGL 3.0 and up.
                    Qt does not support OpenGL ES 3.0 yet, so you're left with any of the desktop versions: QOpenGLFunctions_3_0 or one of the higher, profiled ones.

                    Use these instead of QOpenGLFunctions (include is not enough).

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      the_shedding_reptile
                      wrote on last edited by
                      #11

                      [quote author="Chris Kawa" date="1418430389"]@
                      class OpenGLWindow : public QWindow, protected QOpenGLFunctions
                      @
                      Use these instead of QOpenGLFunctions (include is not enough).[/quote]

                      Thank you, that got it working.
                      If anybody runs into this, I just changed the include to @#include <QOpenGLFunctions_4_0_Core>@

                      and the inheritance to
                      @class OpenGLWindow : public QWindow, protected QOpenGLFunctions_4_0_Core@

                      1 Reply Last reply
                      0

                      • Login

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