Sign in to follow this  

Black screen using frame buffer

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

Hi,
 

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):

6WTbY.png
 

Results: 
  •  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):

g99I3.png


Results: 
  •  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
 
Thanks!
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

This topic is 1122 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this