• Advertisement
Sign in to follow this  

FBOs in fullscreen

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

This is strange. I've just switched from pbuffers to FBOs, and they work fine for rendering to texture in windowed mode - but in fullscreen, the texture remains blank. Here's how I set up the FBO and its accompanying texture and renderbuffer:
 glGenTextures(1,&texture);
 glBindTexture(GL_TEXTURE_2D,texture);
 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16, size, size, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);

 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	
 glGenFramebuffersEXT(1,&framebuffer);
 glGenRenderbuffersEXT(1,&renderbuffer);

 glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, renderbuffer);
 glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, size, size);

 GLenum status=glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
 switch(status){
  case GL_FRAMEBUFFER_COMPLETE_EXT:
   break;
  case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
   break;
  default:
   glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
   exit(0);
 }

 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);

 glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texture, 0);
 glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, renderbuffer);
 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

And rendering (which hardly seems worth posting):
 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebuffer);

 Render();

 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);

Anyone else experienced problems using FBOs in fullscreen? The code is so straightforward that I don't see much that could be going wrong with it, so I'm wondering if this is a driver issue. This is on a creaky old GF Go5200, with the latest drivers from guru3d. Thanks for any help.

Share this post


Link to post
Share on other sites
Advertisement
Well, I went ahead and got the last stable driver, and now it works! My faith in beta releases has been heavily shaken.

Share this post


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

  • Advertisement