aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl/GraphicsContext3D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/native/ogl/GraphicsContext3D.c')
-rw-r--r--src/native/ogl/GraphicsContext3D.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/native/ogl/GraphicsContext3D.c b/src/native/ogl/GraphicsContext3D.c
index bdff363..b3772dd 100644
--- a/src/native/ogl/GraphicsContext3D.c
+++ b/src/native/ogl/GraphicsContext3D.c
@@ -15,6 +15,9 @@
#include "gldefs.h"
+extern void throwAssert(JNIEnv *env, char *str);
+
+
JNIEXPORT
void JNICALL Java_javax_media_j3d_GraphicsContext3D_readRasterNative(
JNIEnv *env, jobject obj, jlong ctxInfo,
@@ -79,9 +82,11 @@ void JNICALL Java_javax_media_j3d_GraphicsContext3D_readRasterNative(
case FORMAT_BYTE_LA:
gltype = GL_LUMINANCE_ALPHA;
break;
+
case FORMAT_BYTE_GRAY:
case FORMAT_USHORT_GRAY:
- /* TODO: throw exception */
+ default:
+ throwAssert(env, "illegal format");
break;
}
byteData = (jbyte *)(*(table->GetPrimitiveArrayCritical))(env,