Jump to content
  • Advertisement
Sign in to follow this  
graphicscoder

FBO RenderToTexture

This topic is 2814 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
glFramebufferTexture2DOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, m_uiBlurTexture, 0);

Thanks in Advance

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

Share this post


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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!