I need to do some offscreen render to use the rendered image in something different from OpenGL context (for instance I need to use the image in a QListWidgetItem inside a Qt application). After documenting a little bit I've found that Frame Buffer Object (FBO) is what I have to use in combination with glReadPixels
for getting the raw image from OpenGL/GPU into my application. So, here I am against FBO.
I've found that I need to attach the FBO to a texture otherway it does not work and glCheckFramebufferStatus
gives me: GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
. So when I try to init the FBO I need to add also glGenTextures
and glBindTexture
etc..
But.. why? I don't need a texture for now.. why do I have to declare/init/bind (don't know what is the best word here) a texture?
What is the "minimal" FBO setting for get the images? And what about if in my application I need also stencil or depth images? Are things different?
And using back buffer instead of FBO? Is it slower? Do I still need a texture?
I'm kind of afraid of using textures because of a lot of parameters () I don't understand for now..
Sorry for confusion..