Correct usage of QOpenGLxxxx bind() and release()



  • Hi,

    I saw into QOpenGL examples two different ways to bind/release QOpenGL objects:

    The first one, bind() a QOpenGLShaderProgram at the beginning of paintGL() and releases it at the end.

    The second one bind() the QOpenGLShaderProgram init initializeGL() and never releases it.

    So which implementation is the good one?

    What about QOpenGLTexture? Do I need to release() once it has been bound?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.