[cogl-fbo] Remove poorly documented workaround for unknown driver/hardware

The comment just said: "Some implementation require a clear before drawing
to an fbo.  Luckily it is affected by scissor test." and did a scissored
clear, which is clearly a driver bug workaround, but for what driver?  The
fact that it was copied into the gles backend (or vica versa is also
suspicious since it seems unlikely that the workaround is necessary for both
backends.)

We can easily restore the workaround with a better comment if this problem
really still exists on current drivers, but for now I'd rather minimize
hand-wavey workaround code that can't be tested.
This commit is contained in:
Robert Bragg 2009-09-15 22:15:03 +01:00
parent df920a42df
commit cc0af441f2
2 changed files with 0 additions and 29 deletions

View File

@ -225,16 +225,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
/* Bind offscreen framebuffer object */
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, fbo->gl_handle) );
GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
/* Some implementation require a clear before drawing
to an fbo. Luckily it is affected by scissor test. */
/* FIXME: test where exactly this is needed end whether
a glClear with 0 argument is enough */
GE( glPushAttrib (GL_SCISSOR_BIT) );
GE( glScissor (0,0,0,0) );
GE( glEnable (GL_SCISSOR_TEST) );
GE( glClear (GL_COLOR_BUFFER_BIT) );
GE( glPopAttrib () );
}
else if (target & COGL_WINDOW_BUFFER)
{

View File

@ -157,9 +157,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
if (target == COGL_OFFSCREEN_BUFFER)
{
GLboolean scissor_enabled;
GLint scissor_box[4];
/* Make sure it is a valid fbo handle */
if (!cogl_is_offscreen (offscreen))
return;
@ -197,22 +194,6 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
/* Bind offscreen framebuffer object */
GE( glBindFramebuffer (GL_FRAMEBUFFER, fbo->gl_handle) );
GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
/* Some implementation require a clear before drawing
to an fbo. Luckily it is affected by scissor test. */
/* FIXME: test where exactly this is needed end whether
a glClear with 0 argument is enough */
scissor_enabled = glIsEnabled (GL_SCISSOR_TEST);
GE( glGetIntegerv (GL_SCISSOR_BOX, scissor_box) );
GE( glScissor (0, 0, 0, 0) );
GE( glEnable (GL_SCISSOR_TEST) );
GE( glClear (GL_COLOR_BUFFER_BIT) );
if (!scissor_enabled)
glDisable (GL_SCISSOR_TEST);
glScissor (scissor_box[0], scissor_box[1],
scissor_box[2], scissor_box[3]);
}
else if (target & COGL_WINDOW_BUFFER)
{