From d6f9dbc493df725d3d574403549de142c5e1222a Mon Sep 17 00:00:00 2001
From: Kenneth Russel <kbrussel@alum.mit.edu>
Date: Mon, 24 Oct 2005 19:21:03 +0000
Subject: Merged JSR-231 branch on to the main JOGL trunk. The main trunk now
 contains the evolving JSR-231 Reference Implementation and the JSR-231 branch
 is permanently closed.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@401 232f8b59-042b-4e1e-8c03-345bb8c30851
---
 make/glu-common.cfg | 193 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 117 insertions(+), 76 deletions(-)

(limited to 'make/glu-common.cfg')

diff --git a/make/glu-common.cfg b/make/glu-common.cfg
index 917a95a62..e0a5b150a 100644
--- a/make/glu-common.cfg
+++ b/make/glu-common.cfg
@@ -1,19 +1,39 @@
 # This .cfg file provides common options used among all GLU glue code
 # generated for Jogl on all platforms.
-Package net.java.games.jogl
-ImplPackage net.java.games.jogl.impl
-JavaClass GLU
-ImplJavaClass GLUImpl
+Style ImplOnly
+ImplPackage javax.media.opengl.glu
+ImplJavaClass GLU
 JavaOutputDir ../build/gensrc/classes
 NativeOutputDir ../build/gensrc/native/jogl
 HierarchicalNativeOutput false
 
+EmitProcAddressTable true
+ProcAddressTablePackage   com.sun.opengl.impl
+ProcAddressTableClassName GLUProcAddressTable
+GetProcAddressTableExpr   getGLUProcAddressTable()
+
 #
 # Imports needed by all glue code
 #
 Import java.nio.*
-Import net.java.games.jogl.*
-Import net.java.games.jogl.impl.*
+Import javax.media.opengl.*
+Import javax.media.opengl.glu.*
+Import com.sun.opengl.impl.*
+
+# GLU needs access to the GLUtesselatorImpl class for GLUtesselator
+# and to the Mipmap class for scaling and mipmap generation
+Import com.sun.opengl.impl.tessellator.GLUtessellatorImpl
+Import com.sun.opengl.impl.error.Error
+Import com.sun.opengl.impl.mipmap.Mipmap
+Import com.sun.opengl.impl.registry.Registry
+Import com.sun.opengl.utils.*
+Import java.security.*
+
+# Custom Java code for GLU class
+IncludeAs CustomJavaCode GLU glu-CustomJavaCode.java
+
+CustomCCode /* Include the OpenGL GLU header */
+CustomCCode #include <GL/glu.h>
 
 # Raise GLException instead of RuntimeException in glue code
 RuntimeExceptionType GLException
@@ -25,25 +45,6 @@ RuntimeExceptionType GLException
 Opaque boolean GLboolean
 Opaque boolean BOOL
 
-#
-# Some functions that return native byte pointers or accept them as
-# arguments should have them auto-converted to Java Strings
-#
-ReturnsString gluGetString
-ReturnsString gluErrorString
-ArgumentIsString gluCheckExtension 0 1
-
-#
-# Some routines should only use the Java New IO package
-#
-#NIOOnly gluScaleImage
-#NIOOnly gluBuild1DMipmaps
-#NIOOnly gluBuild2DMipmaps
-#NIOOnly gluBuild3DMipmaps
-#NIOOnly gluBuild1DMipmapLevels
-#NIOOnly gluBuild2DMipmapLevels
-#NIOOnly gluBuild3DMipmapLevels
-
 #
 # Don't output #defines of GLU version identifier strings as constants, 
 # because we don't need them java-side. 
@@ -67,24 +68,38 @@ Ignore GLU_EXT_.+
 
 # Javadoc for the GLU class
 ClassJavadoc GLU /**
-ClassJavadoc GLU  * Provides access to the OpenGL utility library routines.
-ClassJavadoc GLU  * See {@link GL} for more information.
+ClassJavadoc GLU  * Provides access to the OpenGL Utility Library (GLU). This library
+ClassJavadoc GLU  * provides standard methods for setting up view volumes, building
+ClassJavadoc GLU  * mipmaps and performing other common operations.
+ClassJavadoc GLU  *
+ClassJavadoc GLU  * <P>
+ClassJavadoc GLU  *
+ClassJavadoc GLU  * Thanks to the contributions of many individuals, this class is a
+ClassJavadoc GLU  * pure Java port of SGI's original C sources. All of the projection,
+ClassJavadoc GLU  * mipmap, scaling, and tessellation routines that are exposed are
+ClassJavadoc GLU  * compatible with the GLU 1.3 specification. The GLU NURBS routines
+ClassJavadoc GLU  * are not currently exposed.
 ClassJavadoc GLU  */
 
-# Javadoc for the GLUnurbs class
-ClassJavadoc GLUnurbs /**
-ClassJavadoc GLUnurbs  * Wrapper for a GLU NURBS object.
-ClassJavadoc GLUnurbs  */
+#
+# We ignore most of the function declarations in glu.h because we
+# provide a pure Java implementation of most of GLU. Currently the
+# only reason we generate glue code for this class is to provide a
+# fallback path to the C code for the mipmap routines in case of bugs
+# with the Java port (although it has been pretty thoroughly debugged
+# at this point).
+# 
 
-# Javadoc for the GLUquadric class
-ClassJavadoc GLUquadric /**
-ClassJavadoc GLUquadric  * Wrapper for a GLU quadric object.
-ClassJavadoc GLUquadric  */
+#
+# ------------------------
+#    Utility routines
+# ------------------------
+#
 
-# Javadoc for the GLUtesselator class
-ClassJavadoc GLUtesselator /**
-ClassJavadoc GLUtesselator  * Wrapper for a GLU tesselator object.
-ClassJavadoc GLUtesselator  */
+# These are implemented by pure Java
+Ignore gluCheckExtension
+Ignore gluErrorString
+Ignore gluGetString
 
 #
 # ------------------------
@@ -113,6 +128,7 @@ Ignore gluNurbsCurve
 Ignore gluNurbsSurface
 Ignore GLU_NURB.+
 Ignore GLU_.*PARAMETRIC.+
+Ignore GLUnurbs
 
 #
 # ------------------------
@@ -154,16 +170,16 @@ Ignore gluQuadricCallback.*
 # Manually implement the GLU quadric functionality to mostly conform
 # to the C APIs
 Ignore GLUquadric
-ManuallyImplement gluCylinder
-ManuallyImplement gluDeleteQuadric
-ManuallyImplement gluDisk
-ManuallyImplement gluNewQuadric
-ManuallyImplement gluPartialDisk
-ManuallyImplement gluQuadricDrawStyle
-ManuallyImplement gluQuadricNormals
-ManuallyImplement gluQuadricOrientation
-ManuallyImplement gluQuadricTexture
-ManuallyImplement gluSphere
+Ignore gluCylinder
+Ignore gluDeleteQuadric
+Ignore gluDisk
+Ignore gluNewQuadric
+Ignore gluPartialDisk
+Ignore gluQuadricDrawStyle
+Ignore gluQuadricNormals
+Ignore gluQuadricOrientation
+Ignore gluQuadricTexture
+Ignore gluSphere
 
 # Ignore a few of the projection/unprojection APIs altogether because
 # their signatures aren't specified correctly in the header file
@@ -172,35 +188,60 @@ Ignore gluUnProject
 Ignore gluUnProject4
 
 # Manually implement the rest of the projection / unprojection APIs
-ManuallyImplement gluOrtho2D
-ManuallyImplement gluPerspective
-ManuallyImplement gluLookAt
-ManuallyImplement gluPickMatrix
+Ignore gluOrtho2D
+Ignore gluPerspective
+Ignore gluLookAt
+Ignore gluPickMatrix
+
+
+
+
+
+#
+# Some functions that return native byte pointers or accept them as
+# arguments should have them auto-converted to Java Strings
+#
+# ReturnsString gluGetString
+# ReturnsString gluErrorString
+# ArgumentIsString gluCheckExtension 0 1
+
+#
+# Some routines should only use the Java New IO package
+#
+#NIOOnly gluScaleImage
+#NIOOnly gluBuild1DMipmaps
+#NIOOnly gluBuild2DMipmaps
+#NIOOnly gluBuild3DMipmaps
+#NIOOnly gluBuild1DMipmapLevels
+#NIOOnly gluBuild2DMipmapLevels
+#NIOOnly gluBuild3DMipmapLevels
 
 #
 # ------------------------
-#     Mipmaps
+#        Mipmaps
 # ------------------------
 #
-# Ignore the mipmap routines and use GKW's Java port instead.
-# Currently the Java and native code have fallback paths to the
-# C code, but this will be removed in a future release.
-
-Ignore gluBuild1DMipmapLevels
-Ignore gluBuild1DMipmaps
-Ignore gluBuild2DMipmapLevels
-Ignore gluBuild2DMipmaps
-Ignore gluBuild3DMipmapLevels
-Ignore gluBuild3DMipmaps
-Ignore gluScaleImage
-
-# Must force proc address generation for these routines, though, since
-# we still fall back on the C implementations
-
-ForceProcAddressGen gluBuild1DMipmapLevels
-ForceProcAddressGen gluBuild1DMipmaps
-ForceProcAddressGen gluBuild2DMipmapLevels
-ForceProcAddressGen gluBuild2DMipmaps
-ForceProcAddressGen gluBuild3DMipmapLevels
-ForceProcAddressGen gluBuild3DMipmaps
-ForceProcAddressGen gluScaleImage
+# Ignore the C versions of the mipmap code in the public interface and
+# use GKW's Java port instead. The bindings to the C entry points are
+# still being left in for now, but only for debugging purposes and the
+# intent is to remove them in a future release.
+
+# Emit these entry points as private
+
+AccessControl gluBuild1DMipmapLevels PRIVATE
+AccessControl gluBuild1DMipmaps      PRIVATE
+AccessControl gluBuild2DMipmapLevels PRIVATE
+AccessControl gluBuild2DMipmaps      PRIVATE
+AccessControl gluBuild3DMipmapLevels PRIVATE
+AccessControl gluBuild3DMipmaps      PRIVATE
+AccessControl gluScaleImage          PRIVATE
+
+# Rename these methods in the implementing class
+
+RenameJavaMethod gluBuild1DMipmapLevels gluBuild1DMipmapLevelsC
+RenameJavaMethod gluBuild1DMipmaps      gluBuild1DMipmapsC
+RenameJavaMethod gluBuild2DMipmapLevels gluBuild2DMipmapLevelsC
+RenameJavaMethod gluBuild2DMipmaps      gluBuild2DMipmapsC
+RenameJavaMethod gluBuild3DMipmapLevels gluBuild3DMipmapLevelsC
+RenameJavaMethod gluBuild3DMipmaps      gluBuild3DMipmapsC
+RenameJavaMethod gluScaleImage          gluScaleImageC
-- 
cgit v1.2.3