Clear buffers on start and exit.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9633 4a71c877-e1ca-e34f-864e-861f7616d084
master
Christian Ohm 2010-02-04 21:57:37 +00:00 committed by Git SVN Gateway
parent 6f95d916dc
commit d6113fa149
1 changed files with 3 additions and 0 deletions

View File

@ -245,6 +245,7 @@ BOOL screenInitialise(
glEnable(GL_CULL_FACE);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glErrors();
return true;
@ -254,6 +255,8 @@ BOOL screenInitialise(
/* Release the DD objects */
void screenShutDown(void)
{
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
if (screen != NULL)
{
SDL_FreeSurface(screen);