aboutsummaryrefslogtreecommitdiffstats
path: root/make/gl-es2.cfg
blob: feeb7d1caf25a8e38b9b40d0bc595799aa7f2f1a (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
# This .cfg file is used to generate the GL interface and implementing class.
JavaOutputDir ../build/gensrc/classes
NativeOutputDir ../build/gensrc/native/jogl/es2

ExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL.java
ExtendedInterfaceSymbols ../build/gensrc/classes/javax/media/opengl/GL2ES2.java

Package javax.media.opengl
Style InterfaceAndImpl
JavaClass GLES2
Extends GLES2 GL
Extends GLES2 GL2ES2
ImplPackage com.sun.opengl.impl.es2
ImplJavaClass GLES2Impl
Implements GLES2Impl GL
Implements GLES2Impl GL2ES2
HierarchicalNativeOutput false
Include gl-common.cfg
Include gl-common-extensions.cfg

EmitProcAddressTable true
ProcAddressTableClassName GLES2ProcAddressTable
GetProcAddressTableExpr ((GLES2ProcAddressTable)_context.getGLProcAddressTable())

# Inform the glue code generator of the association between #defines
# and functions and the extensions in which they are defined
GLHeader GLES2/gl2.h
GLHeader GLES2/gl2ext.h

# Force all of the methods to be emitted using dynamic linking so we
# don't need to link against any emulation library on the desktop or
# depend on the presence of an import library for a particular device
ForceProcAddressGen __ALL__

# Also force the calling conventions of the locally generated function
# pointer typedefs for these routines to GL_APIENTRY
LocalProcAddressCallingConvention __ALL__ GL_APIENTRY

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

CustomJavaCode GLES2     public void glClearDepth(double depth);
CustomJavaCode GLES2Impl public void glClearDepth(double depth) {
CustomJavaCode GLES2Impl   glClearDepthf((float)depth); }

CustomJavaCode GLES2     public void glDepthRange(double zNear, double zFar);
CustomJavaCode GLES2Impl public void glDepthRange(double zNear, double zFar) {
CustomJavaCode GLES2Impl   glDepthRangef((float)zNear, (float)zFar); }

CustomCCode /* Define GL_GLEXT_PROTOTYPES so that the OpenGL extension prototypes in
CustomCCode    "glext.h" are parsed. */
CustomCCode #define GL_GLEXT_PROTOTYPES

CustomCCode /* Include the OpenGL headers */
CustomCCode /* #define GL_APICALL __declspec(dllimport) */
CustomCCode #include <GLES2/gl2ext.h>
CustomCCode #include <stdlib.h>
Include intptr.cfg

CustomJavaCode GLES2  public void glShaderSource(int shader, java.lang.String[] source);
CustomJavaCode GLES2  public void glShaderSource(IntBuffer shaders, java.lang.String[][] sources);
CustomJavaCode GLES2  public void glShaderBinary(IntBuffer shaders, int binFormat, java.nio.Buffer bin);
CustomJavaCode GLES2  /**
CustomJavaCode GLES2   * Wrapper for glShaderBinary and glShaderSource.
CustomJavaCode GLES2   * Tries binary first, if not null, then the source code, if not null.
CustomJavaCode GLES2   * The binary trial will fail in case no binary interface exist (GL2 profile),
CustomJavaCode GLES2   * hence the fallback to the source code.
CustomJavaCode GLES2   */
CustomJavaCode GLES2  public void glShaderBinaryOrSource(IntBuffer shaders, 
CustomJavaCode GLES2                                     int binFormat, java.nio.Buffer bin,
CustomJavaCode GLES2                                     java.lang.String[][] sources);

IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-common.java
IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gles2.java
IncludeAs CustomJavaCode GLES2Impl gl-impl-CustomJavaCode-gl2_es2.java
IncludeAs CustomCCode gl-impl-CustomCCode.c

Import javax.media.opengl.GLES1
Import javax.media.opengl.GLES2
Import javax.media.opengl.GL2
Import javax.media.opengl.util.BufferUtil