Binding QOpenGLTexture to Depth attachment of QOpenGLFramebufferObject



  • Is there a nice way to bind a QOpenGLTexture to the QOpenGLFramebufferObject depth component using only Qt calls?

    I'm guessing you could do it with raw GL commmands, something like:

    myQOpenGLFramebufferObject.bind();
    GLuint texDepthBufferId = myQOpenGLTexture.textureId()
    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, texDepthBufferId, 0);
    

    But I'm wondering if the QOpenGLFramebufferObject class has a nice way to bind a texture to the depth attachment? I can't seem to find anything. Is using raw GL calls the way to go?

    Thanks in advanced.


Log in to reply
 

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