summaryrefslogtreecommitdiffstats
path: root/src/native/d3d
diff options
context:
space:
mode:
authorAlessandro Borges <[email protected]>2006-01-05 11:35:56 +0000
committerAlessandro Borges <[email protected]>2006-01-05 11:35:56 +0000
commitba734ed8dd6586573a45d7232e4403831feedad2 (patch)
treea9f2e6bfdc25773916d4bd3223723dabeb7e2228 /src/native/d3d
parentb270541efc7832d8b6f33c1565427ced2ccb5fb0 (diff)
Fix ZFunc behavior. ZFunc must work even when there is no z-buffer write enable, just as OpenGL does.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@494 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/d3d')
-rw-r--r--src/native/d3d/Attributes.cpp15
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)