PDA

View Full Version : FBO problem in GFX5200



mikeman
05-10-2005, 09:15 AM
I use the following code to setup the framebuffer:

GLuint color_tex,depth_rb,fb;
glGenTextures(1,&color_tex);
//initialize textures
glBindTexture(GL_TEXTURE_2D,color_tex);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,512,512,0,GL_R GB,GL_UNSIGNED_BYTE,0);

glGenRenderbuffersEXT(1, &depth_rb);
//initialize depth renderbuffer
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depth_rb);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, 512, 512);

glGenFramebuffersEXT(1, &fb);
//initialize frame buffers
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_CO LOR_ATTACHMENT0_EXT,GL_TEXTURE_2D,color_tex, 0);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depth_rb);

The code seems right, however, it doesn't work in my system. If I comment out the depth attachment it works. I always get FRAMEBUFFER_UNSUPPORTED, no matter what format I choose for DEPTH_COMPONENT(16,24 or 32).

So, what's the deal here? I have the latest drivers(75.90) and the extension is supported in my card.
I could assume it's because the FBO implementation is still in beta, but other users tried it in 6800 and it worked.

Matt Zamborsky
05-10-2005, 10:10 AM
what about to search for this problem on this forum ? :) , you must change some settings in driver option , maybe a profile too. Then try to reinstall driver and it should work.

mikeman
05-10-2005, 10:39 AM
Ok, I installed 76.45 drivers and it works :) Thanks for the reply.