From 343b658c32a6473c545187c1e276ee5d06c2686a Mon Sep 17 00:00:00 2001 From: Kevin Rushforth Date: Wed, 9 Jun 2004 04:25:41 +0000 Subject: Initial creation of j3d-core-utils sources in CVS repository git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@7 ba19aa83-45c5-6ac9-afd3-db810772062c --- src/native/ogl/NativeAPIInfo.c | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/native/ogl/NativeAPIInfo.c (limited to 'src/native/ogl/NativeAPIInfo.c') diff --git a/src/native/ogl/NativeAPIInfo.c b/src/native/ogl/NativeAPIInfo.c new file mode 100644 index 0000000..8cd0841 --- /dev/null +++ b/src/native/ogl/NativeAPIInfo.c @@ -0,0 +1,38 @@ +/* + * $RCSfile$ + * + * Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. + * + * Use is subject to license terms. + * + * $Revision$ + * $Date$ + * $State$ + */ + +/* + * Portions of this code were derived from work done by the Blackdown + * group (www.blackdown.org), who did the initial Linux implementation + * of the Java 3D API. + */ + +#include + +#include "javax_media_j3d_MasterControl.h" + +JNIEXPORT +jint JNICALL Java_javax_media_j3d_NativeAPIInfo_getRenderingAPI( + JNIEnv *env, jobject obj) +{ +#ifdef WIN32 + return (jint)javax_media_j3d_MasterControl_RENDER_OPENGL_WIN32; +#endif /* WIN32 */ + +#ifdef SOLARIS + return (jint)javax_media_j3d_MasterControl_RENDER_OPENGL_SOLARIS; +#endif /* SOLARIS */ + +#ifdef __linux__ + return (jint)javax_media_j3d_MasterControl_RENDER_OPENGL_LINUX; +#endif /* __linux__ */ +} -- cgit v1.2.3