From cf6b1b2ae2b48e46c6e09932902c0fd72e24f501 Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Fri, 1 Oct 2004 18:01:03 +0000 Subject: Issue number: 74 Obtained from: miles Submitted by: kcr Reviewed by: kcr Fix for Issue 74 : Texture/color math difference (D3D vs OGL) git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@51 ba19aa83-45c5-6ac9-afd3-db810772062c --- src/native/d3d/Attributes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/native') diff --git a/src/native/d3d/Attributes.cpp b/src/native/d3d/Attributes.cpp index 7798226..8f0bc3c 100644 --- a/src/native/d3d/Attributes.cpp +++ b/src/native/d3d/Attributes.cpp @@ -1265,7 +1265,7 @@ void JNICALL Java_javax_media_j3d_TextureAttributesRetained_updateCombinerNative device->SetTextureStageState(ts, D3DTSS_COLOROP, - combineFunctionTable[(combineRgbMode << 2) + combineRgbScale]); + combineFunctionTable[(combineRgbMode << 2) + combineRgbScale - 1]); if (combineRgbMode != javax_media_j3d_TextureAttributes_COMBINE_INTERPOLATE) { device->SetTextureStageState(ts, D3DTSS_COLORARG1, @@ -1284,7 +1284,7 @@ void JNICALL Java_javax_media_j3d_TextureAttributesRetained_updateCombinerNative } device->SetTextureStageState(ts, D3DTSS_ALPHAOP, - combineFunctionTable[(combineAlphaMode << 2) + combineAlphaScale]); + combineFunctionTable[(combineAlphaMode << 2) + combineAlphaScale - 1]); if (combineAlphaMode != javax_media_j3d_TextureAttributes_COMBINE_INTERPOLATE) { device->SetTextureStageState(ts, D3DTSS_ALPHAARG1, -- cgit v1.2.3