summaryrefslogtreecommitdiffstats
path: root/make/glu-common.cfg
blob: dbf8bb1154a400248d0f74efe6d396c3a13efaa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# This .cfg file provides common options used among all GLU glue code
# generated for Jogl on all platforms.
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()

# Pick up on-line OpenGL javadoc thanks to user cylab on javagaming.org forums
TagNativeBinding true

#
# Imports needed by all glue code
#
Import javax.media.opengl.*
Import javax.media.opengl.glu.*
Import com.sun.opengl.impl.*

# GLU needs access to the GLUtesselatorImpl class for GLUtesselator,
# to the Mipmap class for scaling and mipmap generation,
# and to the nurbs.* package for the NURBS functionality
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.impl.nurbs.*
Import com.sun.opengl.util.*
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

#
# Opaques and other directives for platform-independent routines
#

Opaque boolean GLboolean
Opaque boolean BOOL

#
# Don't output #defines of GLU version identifier strings as constants, 
# because we don't need them java-side. 
#
Ignore GLU_VERSION_.+

#
# Ignore the non-GLU functions 
#
Ignore gl[^u].+

#
# Ignore the non-GLU constants
#
Ignore GL[^U]?_.+

#
# Ignore the GLU extension constants, since we don't need them java-side
#
Ignore GLU_EXT_.+

# Javadoc for the GLU class
ClassJavadoc GLU /**
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.  The GLU NURBS
ClassJavadoc GLU  * routines are not currently exposed.
ClassJavadoc GLU  * 
ClassJavadoc GLU  * <P>
ClassJavadoc GLU  *
ClassJavadoc GLU  * Notes from the Reference Implementation for this class:
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  */

#
# 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).
# 

#
# ------------------------
#    Utility routines
# ------------------------
#

# These are implemented by pure Java
Ignore gluCheckExtension
Ignore gluErrorString
Ignore gluGetString

#
# ------------------------
#         NURBS
# ------------------------
#

#
# !!!!!!!!!!!!! FIXME:
# Ignore these Nurbs things until we get other stuff working
#
Ignore gluBeginCurve
Ignore gluBeginSurface
Ignore gluBeginTrim
Ignore gluEndCurve
Ignore gluEndSurface
Ignore gluEndTrim
Ignore gluLoadSamplingMatrices
Ignore gluPwlCurve
Ignore gluNewNurbsRenderer
Ignore gluDeleteNurbsRenderer
Ignore gluNurbsProperty
Ignore gluGetNurbsProperty
Ignore gluNurbsCallback.*
Ignore gluNurbsCurve
Ignore gluNurbsSurface
Ignore GLU_NURB.+
Ignore GLU_.*PARAMETRIC.+
Ignore GLUnurbs

#
# ------------------------
#     Tesselators
# ------------------------
#

#
# Ignore these methods; we must manually implement their C and Java code
#
Ignore gluBeginPolygon
Ignore gluTessCallback
Ignore gluDeleteTess
Ignore gluEndPolygon
Ignore gluGetTessProperty
Ignore gluNewTess
Ignore gluNextContour
Ignore gluTessBeginContour
Ignore gluTessBeginPolygon
Ignore gluTessEndContour
Ignore gluTessEndPolygon
Ignore gluTessNormal
Ignore gluTessProperty
Ignore gluTessVertex
Ignore gluTessCallback.*
Ignore GLUtesselator

#
# ------------------------
#     Quadrics
# ------------------------
#
#
# !!!!!!!!!!!!! FIXME:
# Ignore these Quadric things until we get other stuff working
#
Ignore gluQuadricCallback.*

# Manually implement the GLU quadric functionality to mostly conform
# to the C APIs
Ignore GLUquadric
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
Ignore gluProject
Ignore gluUnProject
Ignore gluUnProject4

# Manually implement the rest of the projection / unprojection APIs
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
# ------------------------
#
# 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