diff options
author | Kevin Rushforth <[email protected]> | 2007-03-26 22:58:59 +0000 |
---|---|---|
committer | Kevin Rushforth <[email protected]> | 2007-03-26 22:58:59 +0000 |
commit | d319a907da13b127971aec547022a7dce8cb9c05 (patch) | |
tree | 02fb5b94e0493d4e21bf24b9afc3b64d019fe34b /src/native/d3d | |
parent | e9005593c05ad268256398f2901febdc14d95b26 (diff) |
Issue 239: Stencil buffer should be cleared at the start of each frame
This partial fix adds a new "j3d.stencilClear" boolean property that specifies
whether the stencil buffer is cleared every frame by default.
Note that this is the first part of the partial fix. We still need to finish
the D3D code, and we need to verify whether the stencil mask needs to be
saved/forced to all 1s/restored
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@802 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native/d3d')
-rw-r--r-- | src/native/d3d/Canvas3D.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/native/d3d/Canvas3D.cpp b/src/native/d3d/Canvas3D.cpp index 80eeeb7..8463b0d 100644 --- a/src/native/d3d/Canvas3D.cpp +++ b/src/native/d3d/Canvas3D.cpp @@ -292,12 +292,13 @@ void JNICALL Java_javax_media_j3d_NativePipeline_texturemapping( extern "C" JNIEXPORT void JNICALL Java_javax_media_j3d_NativePipeline_clear( - JNIEnv *env, - jobject obj, - jlong ctx, - jfloat r, - jfloat g, - jfloat b) + JNIEnv *env, + jobject obj, + jlong ctx, + jfloat r, + jfloat g, + jfloat b, + jboolean clearStencil) { GetDevice(); @@ -308,8 +309,10 @@ void JNICALL Java_javax_media_j3d_NativePipeline_clear( if (!d3dCtx->zWriteEnable) { device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); } - - /* clear stencil, if in used */ + + // TODO KCR : Issue 239 - use clearStencil to decide whether to clear stencil + + /* clear stencil, if in used */ if (d3dCtx->stencilWriteEnable ) { // clear stencil and ZBuffer HRESULT hr = device->Clear(0, NULL, |