[MPlayer-dev-eng] [PATCH] vo_gl2.c - glClear every frame in fullscreen mode

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Dec 8 14:10:06 CET 2003


> On Sun, 16 Nov 2003 19:19:04 +0100
> Timo Kanera <timo at kanera.de> wrote:
>
> > Hi,
> >
> > the attached patch modifies vo_gl2.c to perform a
glClear(GL_COLOR_BUFFER_BIT)
> > for every frame when in fullscreen mode. This seems to be needed because
of the
> > way glXSwapBuffers works. From the glXSwapBuffers manpage:
> >
> > The contents of the back buffer become undefined after a swap. Note that
this
> > applies to pixel buffers as well as windows.
>
>
> Why does that only matter in fullscreen ?

Because in windowed mode all of the window is used to draw the movie , so
the framebuffer gets "cleared" by the movie drawing function.
Probably the cleaner solution would be to clear it always, but I don't know
how high the performance penalty would be (e.g. with only software OpenGL).
And currently noone seems to have problems in windowed mode...

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list