Jump to content
  • Advertisement
Sign in to follow this  

FBO RenderToTexture

This topic is 2890 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

I am trying to create a blurr effect using FBO,Please find the below code snippet
i noticed that glGenFramebuffersOES call is always triggering the error code 1280(INVALID_ENUM).Could any one guide me how to fix this issue.
But glBindFramebufferOES & glFramebufferTexture2DOES is not triggering any error.

//FBO Setup
glGenTextures(1, &textureFBO); // texture handle
glBindTexture(GL_TEXTURE_2D, textureFBO); //bind it.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Linear Filtered
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtered

glGenFramebuffersOES(1, &FBO); // frame buffer
glBindFramebufferOES(GL_FRAMEBUFFER_OES, FBO); //bind the frame buffer

Thanks in Advance

[Edited by - graphicscoder on January 7, 2011 2:29:29 AM]

Share this post

Link to post
Share on other sites
AFAIK the only documented error code for glGenFrameBuffers is GL_INVALID_VALUE (1281 or 0x0501). Are you sure that GL_INVALID_ENUM (1280 or 0x0500) is set by glGenFrameBuffersOES?

Share this post

Link to post
Share on other sites
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!