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):
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):
Second configuration (empty screen problem):
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.