PDA

View Full Version : GlClear with FBO Render target



Federico
08-19-2010, 03:04 AM
Hi i try to explain the problem because it is impossible to send code because it is a 3d engine and it would be too difficult to cut each part....
i use a render target using a FBO buffer every time i call glclear it doesn't work....but every call with begin/end and glDrawArrays work properly....i call glclear with no mask and with all bits correct. As you can see in the attachment the very strange thing is that clear color (blue) is present in the borders of the drawen geometries...it seems glclear has effect only near the drawen geometry!?!?!?
I can't explain myself why!?!?!?
anyone can do?

Dark Photon
08-19-2010, 04:59 AM
i use a render target using a FBO buffer every time i call glclear it doesn't work....
Right before you call glClear, bind the FBO, disable the SCISSOR_TEST, DITHER, call glColorMask, glDepthMask, glStencilMask, glClearColor, glClearDepth, and glClearStencil. That should give you some idea what's wrong in your code.

Federico
08-19-2010, 06:55 AM
thanks but if it wouldn't be binded i could not draw geometries...
and way glclear draw the coronas around the geometry like the pictures? without glclaer i have no (BLUE) coronas around the drawen gheometry...