Add texture to QT OpenGL scene graph

I am trying to render a texture to a simple opengl square. I just want to map the texture directly onto the rectangle. I followed the scene graph example, located here, on how to call opengl functions and display shapes, but i'm lost with trying to add a texture. I checked through multiple docs and they all dealt with using the fixed function pipeline, or subclassing QGLWidget. I would like to keep this example OpenGL ES and with utilizing shaders.

I am new to OpenGL so if anyone could give me an understanding of what has to happen, that would be wonderful.


You need to render a texture in a Frame Buffer Object and then display it in the scene graph. See the Scene Graph - Rendering FBOs example.

链接地址: http://www.djcxy.com/p/63882.html

上一篇: 合并OpenGl和QML时,在glDrawArrays上的Segfault

下一篇: 将纹理添加到QT OpenGL场景图