c++ - Multi-texturing using QOpenGLTexture and QOpenGLFrameBufferObject -


I am trying to port a new project into new Qt5 OpenGL classes. I want to render in a texture using an FBO. In the previous code, multiple textures have been used which I am connecting with FBO on-demand. Therefore, I attach a fixed texture object, do the rendering, attach another texture and do a different operation and output is given in the newly attached texture, and so on.

I was wondering how I go about doing this using Qt5 OpenGL classes. For example, I can not understand how to attach a QOpenGLTexture object to QOpenGLFrameBufferObject , so that I can present it. I can see that there is a texture () method and a latchactation () method but they both just return text IDs, as well as the active texture unit How can I change? For example, I want to sample two textures in my reader program. Therefore, I need to compose two textures with different textile units.

To clarify, the main problem I am running with the new API is that I QOpenGLFrameBufferObject will return a QOpenGLTexture object to only ToImage () method and texture () and latchactation () are the methods I think I just type QOngGLTtexture Can I create QImage to toImage () ) using But I'm not sure he would be skilled.

Could.

itemprop = "text">

Yes, QOpenGLFrameBufferObject predicts QOpenGLTtexture and in this way, it does not use QOpenGLTtexture or does not display It should be added, but in reality, QOpenGLFBO should only be re-written to support multiple attachments.

In addition, what is the problem of using GL calls manually?

  GLuint textureId = Fbo-> Texture (); GlActiveTexture (GL_TEXTURE4); Globinated (GL_TEXTURE_2D, textured ID); GlActiveTexture (GL_TEXTURE9); Globinated (GL_TEXTURE_3D, second piece); QOpenGLTexture * yet other = affable (); YetAnother-> Tie (2); Program- & gt; Set Uniform Value ("samplerphosphate", GL_TEXTURE4 - GL_TEXTURE0); Program- & gt; Set Uniform Value ("my3dSampler", GL_TEXTURE9 - GL_TEXTURE0); Program- & gt; Set Uniform Value ("One Uniform", 2); // Use layout (binding =) in GLSL  

etc.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -