aboutsummaryrefslogtreecommitdiffstats
path: root/src/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/native')
-rw-r--r--src/native/d3d/D3dCtx.cpp11
-rw-r--r--src/native/ogl/Canvas3D.c13
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, &param);
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, &param);
+ 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