diff options
Diffstat (limited to 'smelt/sdl')
-rw-r--r-- | smelt/sdl/gfx_sdl.cpp | 6 | ||||
-rw-r--r-- | smelt/sdl/smelt_internal.hpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/smelt/sdl/gfx_sdl.cpp b/smelt/sdl/gfx_sdl.cpp index 1c8545f..ae50db2 100644 --- a/smelt/sdl/gfx_sdl.cpp +++ b/smelt/sdl/gfx_sdl.cpp @@ -47,7 +47,7 @@ bool SMELT_IMPL::smRenderBegin2D(bool ztest,SMTRG trg) vertexArray=vertexBuf; return true; } -bool SMELT_IMPL::smRenderBegin3D(float fov,SMTRG trg) +bool SMELT_IMPL::smRenderBegin3D(float fov,bool ztest,SMTRG trg) { TRenderTargetList *targ=(TRenderTargetList*)trg; if(vertexArray) @@ -55,8 +55,8 @@ bool SMELT_IMPL::smRenderBegin3D(float fov,SMTRG trg) if(pOpenGLDevice->have_GL_EXT_framebuffer_object) pOpenGLDevice->glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,(targ)?targ->frame:0); pOpenGLDevice->glDepthFunc(GL_LESS); - pOpenGLDevice->glEnable(GL_DEPTH_TEST); - zbufenabled=true; + ztest?pOpenGLDevice->glEnable(GL_DEPTH_TEST):pOpenGLDevice->glDisable(GL_DEPTH_TEST); + zbufenabled=ztest; if(targ) { pOpenGLDevice->glScissor(0,0,targ->w,targ->h); diff --git a/smelt/sdl/smelt_internal.hpp b/smelt/sdl/smelt_internal.hpp index f514c54..a14e151 100644 --- a/smelt/sdl/smelt_internal.hpp +++ b/smelt/sdl/smelt_internal.hpp @@ -144,7 +144,7 @@ public: virtual bool smGetInpEvent(smInpEvent *e); virtual bool smRenderBegin2D(bool ztest=0,SMTRG trg=0); - virtual bool smRenderBegin3D(float fov,SMTRG trg=0); + virtual bool smRenderBegin3D(float fov,bool ztest=0,SMTRG trg=0); virtual bool smRenderEnd(); virtual void sm3DCamera6f2v(float *pos,float *rot); virtual void sm2DCamera5f3v(float *pos,float *dpos,float *rot); |