aboutsummaryrefslogtreecommitdiff
path: root/smelt/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'smelt/sdl')
-rw-r--r--smelt/sdl/gfx_sdl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/smelt/sdl/gfx_sdl.cpp b/smelt/sdl/gfx_sdl.cpp
index 3fd3b46..c0e9305 100644
--- a/smelt/sdl/gfx_sdl.cpp
+++ b/smelt/sdl/gfx_sdl.cpp
@@ -101,7 +101,8 @@ void SMELT_IMPL::smClrscr(DWORD color)
GLfloat g=(GLfloat)(GETG(color))/255.f;
GLfloat b=(GLfloat)(GETB(color))/255.f;
pOpenGLDevice->glClearColor(r,g,b,a);
- if(zbufenabled||tdmode)pOpenGLDevice->glClearDepth(1);
+ if(tdmode)pOpenGLDevice->glClearDepth(1);
+ else if(zbufenabled)pOpenGLDevice->glClearDepth(0);
pOpenGLDevice->glClear(GL_COLOR_BUFFER_BIT|((zbufenabled||tdmode)?GL_DEPTH_BUFFER_BIT:0));
}
void SMELT_IMPL::sm3DCamera6f2v(float *pos,float *rot)