Class GLUgl2
-
Field Summary
Fields inherited from class com.jogamp.opengl.glu.GLU
extensionString, GLU_BEGIN, GLU_CCW, GLU_CW, GLU_EDGE_FLAG, GLU_END, GLU_ERROR, GLU_EXTENSIONS, GLU_EXTERIOR, GLU_FALSE, GLU_FILL, GLU_FLAT, GLU_INSIDE, GLU_INTERIOR, GLU_INVALID_ENUM, GLU_INVALID_OPERATION, GLU_INVALID_VALUE, GLU_LINE, GLU_NONE, GLU_OUT_OF_MEMORY, GLU_OUTSIDE, GLU_POINT, GLU_SILHOUETTE, GLU_SMOOTH, GLU_TESS_AVOID_DEGENERATE_TRIANGLES, GLU_TESS_BEGIN, GLU_TESS_BEGIN_DATA, GLU_TESS_BOUNDARY_ONLY, GLU_TESS_COMBINE, GLU_TESS_COMBINE_DATA, GLU_TESS_COORD_TOO_LARGE, GLU_TESS_EDGE_FLAG, GLU_TESS_EDGE_FLAG_DATA, GLU_TESS_END, GLU_TESS_END_DATA, GLU_TESS_ERROR, GLU_TESS_ERROR_DATA, GLU_TESS_ERROR1, GLU_TESS_ERROR2, GLU_TESS_ERROR3, GLU_TESS_ERROR4, GLU_TESS_ERROR5, GLU_TESS_ERROR6, GLU_TESS_ERROR7, GLU_TESS_ERROR8, GLU_TESS_MAX_COORD, GLU_TESS_MISSING_BEGIN_CONTOUR, GLU_TESS_MISSING_BEGIN_POLYGON, GLU_TESS_MISSING_END_CONTOUR, GLU_TESS_MISSING_END_POLYGON, GLU_TESS_NEED_COMBINE_CALLBACK, GLU_TESS_TOLERANCE, GLU_TESS_VERTEX, GLU_TESS_VERTEX_DATA, GLU_TESS_WINDING_ABS_GEQ_TWO, GLU_TESS_WINDING_NEGATIVE, GLU_TESS_WINDING_NONZERO, GLU_TESS_WINDING_ODD, GLU_TESS_WINDING_POSITIVE, GLU_TESS_WINDING_RULE, GLU_TRUE, GLU_UNKNOWN, GLU_VERSION, GLU_VERTEX, versionString
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final GL2
final void
Begins a curve definition.final void
Begins a surface definition.final int
gluBuild1DMipmapLevels
(int target, int internalFormat, int width, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
final int
gluBuild1DMipmaps
(int target, int internalFormat, int width, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data);
final int
gluBuild2DMipmapLevels
(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
final int
gluBuild2DMipmaps
(int target, int internalFormat, int width, int height, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data);
final int
gluBuild3DMipmapLevels
(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
final int
gluBuild3DMipmaps
(int target, int internalFormat, int width, int height, int depth, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data);
final void
Ends a curve definition.final void
Ends a surface.final void
gluLookAt
(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) final void
gluLookAt
(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) final GLUnurbs
Creates a new GLUnurbs object.final void
gluNurbsCurve
(GLUnurbs r, int nknots, float[] knot, int stride, float[] ctlarray, int order, int type) Make a NURBS curve.final void
gluNurbsProperty
(GLUnurbs r, int property, float value) Sets a property on a NURBS object.final void
gluNurbsSurface
(GLUnurbs r, int sknot_count, float[] sknot, int tknot_count, float[] tknot, int s_stride, int t_stride, float[] ctlarray, int sorder, int torder, int type) Makes a NURBS surface.final void
gluOrtho2D
(double left, double right, double bottom, double top) final void
gluOrtho2D
(float left, float right, float bottom, float top) final void
gluPerspective
(double fovy, double aspect, double zNear, double zFar) final void
gluPerspective
(float fovy, float aspect, float zNear, float zFar) final void
gluPickMatrix
(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) final void
gluPickMatrix
(double x, double y, double delX, double delY, IntBuffer viewport) final boolean
gluProject
(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) Interface to C language function:
GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ);
final boolean
gluProject
(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) Interface to C language function:
GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ);
final int
gluScaleImage
(int format, int wIn, int hIn, int typeIn, Buffer dataIn, int wOut, int hOut, int typeOut, Buffer dataOut) Interface to C language function:
GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut);
final boolean
gluUnProject
(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) Interface to C language function:
GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ);
final boolean
gluUnProject
(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) Interface to C language function:
GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ);
final boolean
gluUnProject4
(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) Interface to C language function:
GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW);
final boolean
gluUnProject4
(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) Interface to C language function:
GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW);
final boolean
isFunctionAvailable
(String gluFunctionName) Returns true if the specified GLU core- or extension-function can be successfully used through this GLU instance.Methods inherited from class com.jogamp.opengl.glu.GLU
createGLU, createGLU, getCurrentGL, gluBeginPolygon, gluCheckExtension, gluCylinder, gluDeleteQuadric, gluDeleteTess, gluDisk, gluEndPolygon, gluErrorString, gluGetString, gluGetTessProperty, gluNewQuadric, gluNewQuadric, gluNewQuadric, gluNewTess, gluNextContour, gluPartialDisk, gluPickMatrix, gluPickMatrix, gluProject, gluProject, gluQuadricDrawStyle, gluQuadricNormals, gluQuadricOrientation, gluQuadricTexture, gluSphere, gluTessBeginContour, gluTessBeginPolygon, gluTessCallback, gluTessEndContour, gluTessEndPolygon, gluTessNormal, gluTessProperty, gluTessVertex, gluUnProject, gluUnProject, gluUnProject4, gluUnProject4
-
Constructor Details
-
GLUgl2
public GLUgl2()Instantiates a new OpenGL Utility Library object. A GLU object may be instantiated at any point in the application and is not inherently tied to any particular OpenGL context; however, the GLU object may only be used when an OpenGL context is current on the current thread. Attempts to call most of the methods in the GLU library when no OpenGL context is current will cause an exception to be thrown.The returned GLU object is not guaranteed to be thread-safe and should only be used from one thread at a time. Multiple GLU objects may be instantiated to be used from different threads simultaneously.
-
-
Method Details
-
getCurrentGL2
- Throws:
GLException
-
isFunctionAvailable
Returns true if the specified GLU core- or extension-function can be successfully used through this GLU instance. By "successfully" we mean that the function is both callable on the machine running the program and available on the current display.A GLU function is callable if it is a GLU core- or extension-function that is supported by the underlying GLU implementation. The function is available if the OpenGL implementation on the display meets the requirements of the GLU function being called (because GLU functions utilize OpenGL functions).
Whether or not a GLU function is callable is determined as follows:
- If the function is a GLU core function (i.e., not an
extension),
gluGetString(GLU_VERSION)
is used to determine the version number of the underlying GLU implementation on the host. then the function name is cross-referenced with that specification to see if it is part of that version's specification. - If the function is a GLU extension, the function name is
cross-referenced with the list returned by
gluGetString(GLU_EXTENSIONS)
to see if the function is one of the extensions that is supported by the underlying GLU implementation.
- If the function is a GLU core function then the function is first
cross-referenced with the GLU specifications to find the minimum GLU
version required to call that GLU function. Then the following table
is consulted to determine the minimum GL version required for that version
of GLU:
- GLU 1.0 requires OpenGL 1.0
- GLU 1.1 requires OpenGL 1.0
- GLU 1.2 requires OpenGL 1.1
- GLU 1.3 requires OpenGL 1.2
glGetString(GL_VERSION)
is used to determine the highest OpenGL version that both host and display support, and from that it is possible to determine if the GL facilities required by the GLU function are available on the display. - If the function is a GLU extension, the function name is
cross-referenced with the list returned by
gluGetString(GLU_EXTENSIONS)
to see if the function is one of the extensions that is supported by the underlying GLU implementation.
GLEventListener#displayChanged(GLAutoDrawable,boolean,boolean)
.- Overrides:
isFunctionAvailable
in classGLU
- Parameters:
gluFunctionName
- the name of the OpenGL function (e.g., use "gluNurbsCallbackDataEXT" to check if thegluNurbsCallbackDataEXT(GLUnurbs, GLvoid)
extension is available).
- If the function is a GLU core function (i.e., not an
extension),
-
gluOrtho2D
public final void gluOrtho2D(float left, float right, float bottom, float top) - Overrides:
gluOrtho2D
in classGLU
-
gluOrtho2D
public final void gluOrtho2D(double left, double right, double bottom, double top) - Overrides:
gluOrtho2D
in classGLU
-
gluPerspective
public final void gluPerspective(float fovy, float aspect, float zNear, float zFar) - Overrides:
gluPerspective
in classGLU
-
gluPerspective
public final void gluPerspective(double fovy, double aspect, double zNear, double zFar) - Overrides:
gluPerspective
in classGLU
-
gluLookAt
public final void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) -
gluLookAt
public final void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) -
gluProject
public final boolean gluProject(double objX, double objY, double objZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] winPos, int winPos_offset) Interface to C language function:
GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ);
Accepts the outgoing window coordinates as a single array.
- Overrides:
gluProject
in classGLU
-
gluProject
public final boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos) Interface to C language function:
GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * winX, GLdouble * winY, GLdouble * winZ);
Accepts the outgoing window coordinates as a single buffer.
-
gluUnProject
public final boolean gluUnProject(double winX, double winY, double winZ, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double[] objPos, int objPos_offset) Interface to C language function:
GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ);
Accepts the outgoing object coordinates (a 3-vector) as a single array.
- Overrides:
gluUnProject
in classGLU
-
gluUnProject
public final boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos) Interface to C language function:
GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble * objX, GLdouble * objY, GLdouble * objZ);
Accepts the outgoing object coordinates (a 3-vector) as a single buffer.
-
gluUnProject4
public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, double[] model, int model_offset, double[] proj, int proj_offset, int[] view, int view_offset, double nearVal, double farVal, double[] objPos, int objPos_offset) Interface to C language function:
GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW);
Accepts the outgoing object coordinates (a 4-vector) as a single array.
- Overrides:
gluUnProject4
in classGLU
-
gluUnProject4
public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos) Interface to C language function:
GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble * model, const GLdouble * proj, const GLint * view, GLdouble nearVal, GLdouble farVal, GLdouble * objX, GLdouble * objY, GLdouble * objZ, GLdouble * objW);
Accepts the outgoing object coordinates (a 4-vector) as a single buffer.
-
gluPickMatrix
public final void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset) - Overrides:
gluPickMatrix
in classGLU
-
gluPickMatrix
- Overrides:
gluPickMatrix
in classGLU
-
gluBuild1DMipmapLevels
public final int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
- Overrides:
gluBuild1DMipmapLevels
in classGLU
-
gluBuild1DMipmaps
public final int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data);
- Overrides:
gluBuild1DMipmaps
in classGLU
-
gluBuild2DMipmapLevels
public final int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
- Overrides:
gluBuild2DMipmapLevels
in classGLU
-
gluBuild2DMipmaps
public final int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data);
- Overrides:
gluBuild2DMipmaps
in classGLU
-
gluBuild3DMipmapLevels
public final int gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int level, int base, int max, Buffer data) Interface to C language function:
GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
- Overrides:
gluBuild3DMipmapLevels
in classGLU
-
gluBuild3DMipmaps
public final int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, Buffer data) Interface to C language function:
GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data);
- Overrides:
gluBuild3DMipmaps
in classGLU
-
gluScaleImage
public final int gluScaleImage(int format, int wIn, int hIn, int typeIn, Buffer dataIn, int wOut, int hOut, int typeOut, Buffer dataOut) Interface to C language function:
GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut);
- Overrides:
gluScaleImage
in classGLU
-
gluNurbsProperty
Sets a property on a NURBS object. (NOTE: this function is not currently implemented.)- Parameters:
r
- GLUnurbs object holding NURBS to which a property should be setproperty
- property idvalue
- property value
-
gluNewNurbsRenderer
Creates a new GLUnurbs object.- Returns:
- GLUnurbs object
-
gluBeginCurve
Begins a curve definition.- Parameters:
r
- GLUnurbs object to specify curve to
-
gluBeginSurface
Begins a surface definition.- Parameters:
r
- GLUnurbs object to specify surface to
-
gluEndSurface
Ends a surface.- Parameters:
r
- GLUnurbs object holding surface
-
gluNurbsSurface
public final void gluNurbsSurface(GLUnurbs r, int sknot_count, float[] sknot, int tknot_count, float[] tknot, int s_stride, int t_stride, float[] ctlarray, int sorder, int torder, int type) Makes a NURBS surface.- Parameters:
r
- GLUnurbs object holding the surfacesknot_count
- number of knots in s directionsknot
- knots in s directiontknot_count
- number of knots in t directiontknot
- knots in t directions_stride
- number of control points coordinates in s directiont_stride
- number of control points coordinates in t directionctlarray
- control pointssorder
- order of surface in s directiontorder
- order of surface in t directiontype
- surface type
-
gluNurbsCurve
public final void gluNurbsCurve(GLUnurbs r, int nknots, float[] knot, int stride, float[] ctlarray, int order, int type) Make a NURBS curve.- Parameters:
r
- GLUnurbs object holding the curvenknots
- number of knotsknot
- knot vectorstride
- number of control point coordinatesctlarray
- control pointsorder
- order of the curvetype
- curve type
-
gluEndCurve
Ends a curve definition.- Parameters:
r
- GLUnurbs object holding the curve
-