Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualKaptein

Posted 02 November 2013 - 04:56 AM

I see some slight issues

 

glGenFramebuffers(1, &fbo);

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
-->
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);

 

http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml

glReadBuffer is for glCopyTex* and glReadPixels

 

So you're reading from this,

glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);

and you want to draw to this:

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);

 

In my projects I use shaders to show the results of these operations, because of render-to-texture smile.png


#1Kaptein

Posted 02 November 2013 - 04:55 AM

I see some slight issues

 

http://www.opengl.org/sdk/docs/man/xhtml/glReadBuffer.xml

glReadBuffer is for glCopyTex* and glReadPixels

 

So you're reading from this,

glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);

and you want to draw to this:

glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);

 

In my projects I use shaders to show the results of these operations, because of render-to-texture :)


PARTNERS