Powerino73's picture

FBO frame buffer

i have a strange effect with GlClear how you can see it works only around the drawen geometry (the white color is the glclear color). Any ideas?
If i don't draw anything in the rendertarget it seems that glclear doesn't work my screen is always black while if i render something it works fine but doesn't clear the background it seems it doesn't work!!
Any suggestion?

Inline Images

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Is the correct FBO bound before calling GL.Clear?

// Clear the fbo
GL.BindFramebuffer(..., fbo);
GL.Clear(ClearBufferMask.ColorBufferBit);
// Clear the screen
GL.BindFramebuffer(..., 0);
GL.Clear(ClearBufferMask.ColorBufferBit);