diff options
author | Sven Gothel <[email protected]> | 2008-06-03 10:20:57 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-06-03 10:20:57 +0000 |
commit | c1672c1eacd7a7f90c66d748840978a66aaf4163 (patch) | |
tree | ddcfb0cb73ee1f484874fb0e1b16b827d2496501 /make/glu-CustomJavaCode-gles1.java | |
parent | 9583bd12ed22ece50ff6d1f40fc5a31ce1f96e6d (diff) |
Added Immediate Mode Sink (ImmModeSInk)
to allow ES 1.1 to use immediate mode rendering.
It uses VBO which can also be cached, see GLUquadric 'hack'.
GLUquadrics are now enabled for ES 1.
Added Sync to Newt's X11Window setVisible,
to make sure the window is established for the GLdrawable.
TODO: proper distinguishing of GL profiles and ImmModeSink
usage ..
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1661 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/glu-CustomJavaCode-gles1.java')
-rwxr-xr-x | make/glu-CustomJavaCode-gles1.java | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/make/glu-CustomJavaCode-gles1.java b/make/glu-CustomJavaCode-gles1.java index d0b1f03de..c41ed208e 100755 --- a/make/glu-CustomJavaCode-gles1.java +++ b/make/glu-CustomJavaCode-gles1.java @@ -153,6 +153,59 @@ public boolean isFunctionAvailable(String gluFunctionName) } //---------------------------------------------------------------------- +// Quadric functionality +// + +/** Interface to C language function: <br> <code> void gluCylinder(GLUquadric * quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks); </code> */ +public void gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks) { + ((GLUquadricImpl) quad).drawCylinder(getCurrentGL(), (float) base, (float) top, (float) height, slices, stacks); +} + +/** Interface to C language function: <br> <code> void gluDeleteQuadric(GLUquadric * quad); </code> */ +public void gluDeleteQuadric(GLUquadric quad) { +} + +/** Interface to C language function: <br> <code> void gluDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops); </code> */ +public void gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops) { + ((GLUquadricImpl) quad).drawDisk(getCurrentGL(), (float) inner, (float) outer, slices, loops); +} + +/** Interface to C language function: <br> <code> GLUquadric * gluNewQuadric(void); </code> */ +public GLUquadric gluNewQuadric() { + return new GLUquadricImpl(); +} + +/** Interface to C language function: <br> <code> void gluPartialDisk(GLUquadric * quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep); </code> */ +public void gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep) { + ((GLUquadricImpl) quad).drawPartialDisk(getCurrentGL(), (float) inner, (float) outer, slices, loops, (float) start, (float) sweep); +} + +/** Interface to C language function: <br> <code> void gluQuadricDrawStyle(GLUquadric * quad, GLenum draw); </code> */ +public void gluQuadricDrawStyle(GLUquadric quad, int draw) { + ((GLUquadricImpl) quad).setDrawStyle(draw); +} + +/** Interface to C language function: <br> <code> void gluQuadricNormals(GLUquadric * quad, GLenum normal); </code> */ +public void gluQuadricNormals(GLUquadric quad, int normal) { + ((GLUquadricImpl) quad).setNormals(normal); +} + +/** Interface to C language function: <br> <code> void gluQuadricOrientation(GLUquadric * quad, GLenum orientation); </code> */ +public void gluQuadricOrientation(GLUquadric quad, int orientation) { + ((GLUquadricImpl) quad).setOrientation(orientation); +} + +/** Interface to C language function: <br> <code> void gluQuadricTexture(GLUquadric * quad, GLboolean texture); </code> */ +public void gluQuadricTexture(GLUquadric quad, boolean texture) { + ((GLUquadricImpl) quad).setTextureFlag(texture); +} + +/** Interface to C language function: <br> <code> void gluSphere(GLUquadric * quad, GLdouble radius, GLint slices, GLint stacks); </code> */ +public void gluSphere(GLUquadric quad, double radius, int slices, int stacks) { + ((GLUquadricImpl) quad).drawSphere(getCurrentGL(), (float) radius, slices, stacks); +} + +//---------------------------------------------------------------------- // Projection routines // @@ -478,3 +531,22 @@ private static synchronized void loadGLULibrary() { } } */ + +// QuadricDrawStyle +public static final int GLU_POINT = 100010; +public static final int GLU_LINE = 100011; +public static final int GLU_FILL = 100012; +public static final int GLU_SILHOUETTE = 100013; + +// QuadricCallback +// GLU_ERROR + +// QuadricNormal +public static final int GLU_SMOOTH = 100000; +public static final int GLU_FLAT = 100001; +public static final int GLU_NONE = 100002; + +// QuadricOrientation +public static final int GLU_OUTSIDE = 100020; +public static final int GLU_INSIDE = 100021; + |