diff options
author | Kevin Rushforth <[email protected]> | 2004-09-03 00:17:25 +0000 |
---|---|---|
committer | Kevin Rushforth <[email protected]> | 2004-09-03 00:17:25 +0000 |
commit | 3e1d947d4c4827175d6b1bcf06f70962d1b4c15a (patch) | |
tree | 942d1381ae2925c203d3ec2e98841d048f3b0f72 /src/native | |
parent | 3069025614f7b03f6ccd148a72dcb564ea8ebdd1 (diff) |
Issue number: 26
Added 3 new properties to Canvas3D.queryProperties() that applications can
check: texture3DWidthMax, texture3DHeightMax, and texture3DDepthMax.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@34 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/native')
-rw-r--r-- | src/native/d3d/D3dCtx.cpp | 11 | ||||
-rw-r--r-- | src/native/ogl/Canvas3D.c | 13 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/native/d3d/D3dCtx.cpp b/src/native/d3d/D3dCtx.cpp index 9072a3f..3bc2afb 100644 --- a/src/native/d3d/D3dCtx.cpp +++ b/src/native/d3d/D3dCtx.cpp @@ -1303,6 +1303,17 @@ VOID D3dCtx::setCanvasProperty(JNIEnv *env, jobject obj) id = env->GetFieldID(canvasCls, "textureHeightMax", "I"); env->SetIntField(obj, id, deviceInfo->maxTextureHeight); + + if (deviceInfo->maxTextureDepth > 0) { + id = env->GetFieldID(canvasCls, "texture3DWidthMax", "I"); + env->SetIntField(obj, id, deviceInfo->maxTextureWidth); + + id = env->GetFieldID(canvasCls, "texture3DHeightMax", "I"); + env->SetIntField(obj, id, deviceInfo->maxTextureHeight); + + id = env->GetFieldID(canvasCls, "texture3DDepthMax", "I"); + env->SetIntField(obj, id, deviceInfo->maxTextureDepth); + } } VOID D3dCtx::createVertexBuffer() diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c index 7cfb723..146d531 100644 --- a/src/native/ogl/Canvas3D.c +++ b/src/native/ogl/Canvas3D.c @@ -1015,9 +1015,20 @@ void setupCanvasProperties( glGetIntegerv(GL_MAX_TEXTURE_SIZE, ¶m); rsc_field = (jfieldID) (*(table->GetFieldID))(env, cv_class, "textureWidthMax", "I"); (*(table->SetIntField))(env, obj, rsc_field, param); - + rsc_field = (jfieldID) (*(table->GetFieldID))(env, cv_class, "textureHeightMax", "I"); (*(table->SetIntField))(env, obj, rsc_field, param); + + param = -1; + glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, ¶m); + rsc_field = (jfieldID) (*(table->GetFieldID))(env, cv_class, "texture3DWidthMax", "I"); + (*(table->SetIntField))(env, obj, rsc_field, param); + + rsc_field = (jfieldID) (*(table->GetFieldID))(env, cv_class, "texture3DHeightMax", "I"); + (*(table->SetIntField))(env, obj, rsc_field, param); + + rsc_field = (jfieldID) (*(table->GetFieldID))(env, cv_class, "texture3DDepthMax", "I"); + (*(table->SetIntField))(env, obj, rsc_field, param); } JNIEXPORT |