aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/ogl/CompressedGeometryRetained.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/native/ogl/CompressedGeometryRetained.c')
-rw-r--r--src/native/ogl/CompressedGeometryRetained.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/native/ogl/CompressedGeometryRetained.c b/src/native/ogl/CompressedGeometryRetained.c
index 36ca164..9742707 100644
--- a/src/native/ogl/CompressedGeometryRetained.c
+++ b/src/native/ogl/CompressedGeometryRetained.c
@@ -14,14 +14,11 @@
#include <jni.h>
#include "gldefs.h"
-#ifdef SOLARIS
+#ifdef OBSOLETE_HW_COMPRESSED_GEOM
+/* #if defined(SOLARIS) && defined(__sparc) */
+/* Solaris/Sparc only, all others define this as a noop */
#pragma weak glDrawCompressedGeomSUNX
-
-#else
-static void glDrawCompressedGeomSUNX(GLint size, GLubyte *data) {
- fprintf(stderr, "Warning: glDrawCompressedGeomSUNX() not supported\n") ;
-}
-#endif /* SOLARIS */
+#endif /* OBSOLETE_HW_COMPRESSED_GEOM */
JNIEXPORT
@@ -30,8 +27,12 @@ void JNICALL Java_javax_media_j3d_CompressedGeometryRetained_execute
jint bufferContents, jint renderFlags, jint offset, jint size,
jbyteArray geometry)
{
+ fprintf(stderr,
+ "JAVA 3D ERROR: call to obsolete CompressedGeometryRetained.execute method\n");
+
+
+#ifdef OBSOLETE_HW_COMPRESSED_GEOM
GraphicsContextPropertiesInfo *ctxProperties = (GraphicsContextPropertiesInfo *)ctxInfo;
- jlong ctx = ctxProperties->context;
jbyte *cg = (*env)->GetPrimitiveArrayCritical(env, geometry, 0) ;
@@ -40,6 +41,7 @@ void JNICALL Java_javax_media_j3d_CompressedGeometryRetained_execute
glDrawCompressedGeomSUNX((GLint)(size + 48), (GLubyte *)cg) ;
(*env)->ReleasePrimitiveArrayCritical(env, geometry, cg, 0) ;
+#endif /* OBSOLETE_HW_COMPRESSED_GEOM */
}
@@ -47,24 +49,28 @@ JNIEXPORT
jboolean JNICALL Java_javax_media_j3d_CompressedGeometryRetained_decompressByRef
(JNIEnv *env, jobject obj, jlong ctxInfo)
{
- return JNI_FALSE ;
+ return JNI_FALSE;
}
JNIEXPORT
jboolean JNICALL Java_javax_media_j3d_CompressedGeometryRetained_decompressHW
(JNIEnv *env, jobject obj, jlong ctxInfo, jint majorVersion, jint minorVersion)
{
+ return JNI_FALSE;
+
+
+#ifdef OBSOLETE_HW_COMPRESSED_GEOM
/*
* Return true if hardware decompression is supported for the given
* version number of the compressed geometry.
*/
GraphicsContextPropertiesInfo *ctxProperties = (GraphicsContextPropertiesInfo *)ctxInfo;
- jlong ctx = ctxProperties->context;
return
(ctxProperties->geometry_compression_accelerated == 1) &&
((majorVersion < ctxProperties->geometry_compression_accelerated_major_version) ||
((majorVersion == ctxProperties->geometry_compression_accelerated_major_version) &&
(minorVersion <= ctxProperties->geometry_compression_accelerated_minor_version))) ;
+#endif /* OBSOLETE_HW_COMPRESSED_GEOM */
}