Please forgive me if I am doing something stupid but:
I just CANNOT get a working FBO…
Running the nvidia drivers 76.41, and using glew 1.3.2 for initialisation.
No matter what I seem to try I get a GL_FRAMEBUFFER_UNSUPPORTED_EXT return.
I have tried turning on and off depth testing, selecting GL_NONE as my drawbuffer, RGB and RGBA formats, and am fast running out of ideas.
Some people have mentioned changing control panel options, any ideas which?
I have tried literally dozens and dozens of combinations, with no luck at present. I REALLY do not want to go back to pbuffers…
I dont even need a texture for the colour target, although a renderbuffer works no better, as I only want to read the RGBA back out to memory.
Any help would be greatly appreciated.
I do the following:
glGenFramebuffersEXT(1,tmpbuffer)
self.fb=tmpbuffer[0]
glGenRenderbuffersEXT(2,tmpbuffer)
self.rb=tmpbuffer[0]
self.depth=tmpbuffer[1]
glGenTextures(1,tmpbuffer)
self.tex=tmpbuffer[0]
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,self.fb)
#texture method
glBindTexture(GL_TEXTURE_2D,self.tex)
glTexImage2D(GL_TEXTURE_2D,0,GL_RGBA8,512,512,0,GL_RGBA,GL_UNSIGNED_BYTE,0)
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST)
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_2D,self.tex,0)
#renderbuffer method
#glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,self.rb)
#glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,GL_RGBA8,512,512)
#glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_RENDERBUFFER_EXT,self.rb)
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,self.depth)
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,GL_DEPTH_COMPONENT24,512,512)
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT,self.depth)
status=glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT)
if status!=GL_FRAMEBUFFER_COMPLETE_EXT:
print “framebuffer error status=”,<int>status