Jump to content
  • Advertisement
Sign in to follow this  
ade-the-heat

OpenGL SOLVED ! getting data from shader fbo output

This topic is 4227 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My shader with fbo and multiple render targets seems to execute without error. NowI needto get the output data back from one of the targets which will be in GL_COLOR_ATTACHMENT1_EXT. So I use the following as given in numerous shader examples:
glBindTexture(iTextureType,texId);
glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
CHECK_OPENGL_ERROR;
glReadPixels(0, 0, itexSizeW, itexSizeH, GL_RGBA, GL_FLOAT, 
     textureData);
where textureData is an array of floats
I get an error each time of value "invalid enumerant" after the read buffer call. Do I need the ReadBuffer call ? Is there something else I need to set up ? Problem was due to deleting the fbo before doing the above [Edited by - ade-the-heat on May 21, 2007 5:01:00 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!