• Advertisement
Sign in to follow this  

getting fbo unsupported for rgba texture + depth rb

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

If i do the following I get "fbo unsupported", what am i doing wrong?
GLuint fbo_id = 0, tex_id = 0, rb_id = 0;

glGenFramebuffersEXT(1, &fbo_id);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo_id);
	
glGenTextures(1, &tex_id);
glBindTexture(GL_TEXTURE_2D, tex_id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, tex_id, 0);
	
glGenRenderbuffersEXT(1, &rb_id);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb_id);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, 512, 512);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, rb_id);
	
GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);

Share this post


Link to post
Share on other sites
Advertisement
What do you mean by "fbo unsupported"?
Is "fbo unsupported" = GL_FRAMEBUFFER_UNSUPPORTED_EXT?
Is it on an ati or nvidia card?
On my GF6800, the same code works for me, but as soon as i put GL_DEPTH_COMPONENT16 instead of GL_DEPTH_COMPONENT24, i've got GL_FRAMEBUFFER_UNSUPPORTED_EXT. And i think i've seen on a different forum that it was the opposite on ati card, but i could be wrong about that.

[Edit]
In fact it was on this forum, in a current thread:
Again ATI and Nvidia differences with FBO's
Quote:
Original post by JavaCoolDude
Use Depth16 on ATi and revert to Depth24 on NVIDIA.


Share this post


Link to post
Share on other sites
Quote:
Original post by Alkiem
What do you mean by "fbo unsupported"?
Is "fbo unsupported" = GL_FRAMEBUFFER_UNSUPPORTED_EXT?


yeah. I'm running this on an FX 5200 with driver version 76.76 so it should be able to handle it fine right?

Share this post


Link to post
Share on other sites
Also, I've looked at the spec but I'm slightly confused about querying fbos. Is there a function I can call to work out exactly what is and isnt bound to each attachment point. That might help me debug this problem.

Share this post


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

  • Advertisement