diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/native/d3d/Attributes.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/native/d3d/Attributes.cpp b/src/native/d3d/Attributes.cpp index 2f099d0..8894627 100644 --- a/src/native/d3d/Attributes.cpp +++ b/src/native/d3d/Attributes.cpp @@ -574,7 +574,7 @@ void JNICALL Java_javax_media_j3d_RenderingAttributesRetained_updateNative( else { d3dCtx->zEnable = FALSE; - device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); + device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); } } @@ -582,16 +582,9 @@ void JNICALL Java_javax_media_j3d_RenderingAttributesRetained_updateNative( { d3dCtx->zWriteEnable = db_write_enable; device->SetRenderState(D3DRS_ZWRITEENABLE, db_write_enable); - if (db_write_enable) - { - device->SetRenderState(D3DRS_ZFUNC, getDepthFunc(db_func)); - //printDepthFunc(db_func); - } - else - { - // disable ZFunc if ZBuffer is disabled - device->SetRenderState(D3DRS_ZFUNC, D3DCMP_NEVER); - } + // disable ZFunc if ZBuffer is disabled ? no. + // ZFunc must work even when there is no z-buffer enable + device->SetRenderState(D3DRS_ZFUNC, getDepthFunc(db_func)); } if (at_func == javax_media_j3d_RenderingAttributes_ALWAYS) |