Jump to content
  • Advertisement
Sign in to follow this  

Black screen using frame buffer

This topic is 1435 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'm trying to use frame buffer to add post effects on my game and I've got a problem: My screen is black every time I'm trying to drawn something in. 

My scene is simple: A static red box on a black background.

Basic scene (working):


  •  My red box is visible on the screen. 
  •  "context 1" activate frame buffer, clean it and deactivate it without problem
  •  Texture attached to my framebuffer is red like I want (with the glClear)
Everything is ok here.

Second configuration (empty screen problem):


  •  Scene is the same than the previous, but here I'm trying to draw the red box in the frame buffer too
  •  Texture attached to my framebuffer is red like I want (with the glClear) and with my red box draw over it (OK!)
To resume:
I've got something like that:
 - activate frame buffer
 - draw scene // empty screen when I draw objets here but frame buffer texture is ok.
 - disable frame buffer
 - draw scene
 - display
PS: My application use multiple contexts, it didn't work with one context too and I haven't got error with glGetError.


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!