diff options
author | Chris Xiong <chirs241097@gmail.com> | 2015-08-17 23:44:38 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2015-08-17 23:44:38 +0800 |
commit | 2e0b12061b932009818bcb7d373ae481728ec927 (patch) | |
tree | 95256db245f266ac0f8538f4fda84320e7221a87 /smelt/sdl | |
parent | 03a307b58ddc6244d3fad8d77d7f0bac0a24e05d (diff) | |
download | bullet-lab-remix-2e0b12061b932009818bcb7d373ae481728ec927.tar.xz |
Bug fixes (again).
Further more fixes for smAnmFile. There could be more bugs...
Fix Z Buffer blackening the whole screen in 2D mode.
Diffstat (limited to 'smelt/sdl')
-rw-r--r-- | smelt/sdl/gfx_sdl.cpp | 3 |
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) |