Top Description Fields Constructors Methods
com.jogamp.opengl.glu

public Class GLU

extends Object
Class Inheritance
Known Direct Subclasses
com.jogamp.opengl.glu.gl2.GLUgl2, com.jogamp.opengl.glu.gl2es1.GLUgl2es1
Imports
jogamp.opengl.glu.error.Error, jogamp.opengl.glu.registry.Registry, com.jogamp.opengl.*, com.jogamp.opengl.glu.*, com.jogamp.opengl.util.glsl.ShaderState, jogamp.opengl.*, .ProjectFloat, jogamp.opengl.glu.*, jogamp.opengl.glu.tessellator.GLUtessellatorImpl, com.jogamp.common.util.ReflectionUtil, java.lang.reflect.*, com.jogamp.gluegen.runtime.*, com.jogamp.common.os.*, com.jogamp.common.nio.*, java.nio.*

Provides access to the OpenGL Utility Library (GLU). This library provides standard methods for setting up view volumes, building mipmaps and performing other common operations. The GLU NURBS routines are not currently exposed.

Notes

from the Reference Implementation for this class: Thanks to the contributions of many individuals, this class is a pure Java port of SGI's original C sources. All of the projection, mipmap, scaling, and tessellation routines that are exposed are compatible with the GLU 1.3 specification. The GLU NURBS routines are not currently exposed.

Field Summary

Modifier and TypeField and Description
protected static boolean
protected static boolean
protected static boolean
protected static boolean
public static final String
private static final Class<T>
private static final Class<T>
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final double
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private final ProjectFloat
protected static volatile Object
public static final String

Constructor Summary

AccessConstructor and Description
public
GLU()

Method Summary

Modifier and TypeMethod and Description
public static final GLU
createGLU()

Instantiates a GLU implementation object in respect to the given GL profile of this thread current GL.

public static final GLU
createGLU(GL gl)

Instantiates a GLU implementation object in respect to the given GL profile of the given GL.

public static final GL
public static final void
gluBeginPolygon(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
)

gluBeginPolygon and gluEndPolygon delimit the definition of a nonconvex polygon.

public int
gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int userLevel, int baseLevel, int maxLevel, Buffer data)

Optional, throws GLException if not available in profile

public int
gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, Buffer data)

Optional, throws GLException if not available in profile

public int
gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int userLevel, int baseLevel, int maxLevel, Buffer data)

Optional, throws GLException if not available in profile

public int
gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, Buffer data)

Optional, throws GLException if not available in profile

public int
gluBuild3DMipmapLevels(int target, int internalFormat, int width, int height, int depth, int format, int type, int userLevel, int baseLevel, int maxLevel, Buffer data)

Optional, throws GLException if not available in profile

public int
gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, Buffer data)

Optional, throws GLException if not available in profile

public final boolean
gluCheckExtension(String extName, String extString)

public final void
gluCylinder(GLUquadric quad, double base, double top, double height, int slices, int stacks)

Option (throws GLException if not available in profile).

public final void
gluDeleteQuadric(GLUquadric quad)

Option (throws GLException if not available in profile).

public static final void
gluDeleteTess(GLUtessellator
Specifies the tessellation object to destroy.
tessellator
)

gluDeleteTess destroys the indicated tessellation object (which was created with gluNewTess).

public final void
gluDisk(GLUquadric quad, double inner, double outer, int slices, int loops)

Option (throws GLException if not available in profile).

public static final void
gluEndPolygon(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
)

gluEndPolygon and gluBeginPolygon delimit the definition of a nonconvex polygon.

public final String
gluErrorString(int errorCode)

public final String
gluGetString(int name)

public static final void
gluGetTessProperty(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
,
int
Specifies the property whose value is to be fetched. Valid values are GLU_TESS_WINDING_RULE, GLU_TESS_BOUNDARY_ONLY, and GLU_TESS_TOLERANCES.
which
,
double[]
Specifices an array into which the value of the named property is written.
value
,
int value_offset)

gluGetTessProperty retrieves properties stored in a tessellation object.

public void
gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)

public void
gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)

public final GLUquadric
gluNewQuadric()

Option (throws GLException if not available in profile).

public final GLUquadric
gluNewQuadric(boolean useGLSL, ShaderState st)

public final GLUquadric
gluNewQuadric(boolean useGLSL, int shaderProgram)

private final GLUquadric
gluNewQuadric(boolean useGLSL, ShaderState st, int shaderProgram)

public static final GLUtessellator

Returns:

A new tessellation object.
gluNewTess
()

gluNewTess creates and returns a new tessellation object.

public static final void
gluNextContour(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
,
int
The type of the contour being defined.
type
)

gluNextContour is used to describe polygons with multiple contours.

public void
gluOrtho2D(float left, float right, float bottom, float top)

public void
gluOrtho2D(double left, double right, double bottom, double top)

public final void
gluPartialDisk(GLUquadric quad, double inner, double outer, int slices, int loops, double start, double sweep)

Option (throws GLException if not available in profile).

public void
gluPerspective(float fovy, float aspect, float zNear, float zFar)

public void
gluPerspective(double fovy, double aspect, double zNear, double zFar)

public void
gluPickMatrix(float x, float y, float delX, float delY, int[] viewport, int viewport_offset)

public void
gluPickMatrix(float x, float y, float delX, float delY, IntBuffer viewport)

public void
gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset)

public void
gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport)

public boolean
gluProject(float objX, float objY, float objZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] 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.

public boolean
gluProject(float objX, float objY, float objZ, FloatBuffer model, FloatBuffer proj, IntBuffer view, FloatBuffer 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.

public 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.

public final void
gluQuadricDrawStyle(GLUquadric quad, int draw)

Option (throws GLException if not available in profile).

public final void
gluQuadricNormals(GLUquadric quad, int normal)

Option (throws GLException if not available in profile).

public final void
gluQuadricOrientation(GLUquadric quad, int orientation)

Option (throws GLException if not available in profile).

public final void
gluQuadricTexture(GLUquadric quad, boolean texture)

Option (throws GLException if not available in profile).

public int
gluScaleImage(int format, int widthin, int heightin, int typein, Buffer datain, int widthout, int heightout, int typeout, Buffer dataout)

Optional, throws GLException if not available in profile

public final void
gluSphere(GLUquadric quad, double radius, int slices, int stacks)

Option (throws GLException if not available in profile).

public static final void
gluTessBeginContour(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
)

gluTessBeginContour and gluTessEndContour delimit the definition of a polygon contour.

public static final void
gluTessBeginPolygon(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
,
Object
Specifies a reference to user polygon data.
data
)

gluTessBeginPolygon and gluTessEndPolygon delimit the definition of a convex, concave or self-intersecting polygon.

public static final void
gluTessCallback(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
,
int
Specifies the callback being defined. The following values are valid: GLU_TESS_BEGIN, GLU_TESS_BEGIN_DATA, GLU_TESS_EDGE_FLAG, GLU_TESS_EDGE_FLAG_DATA, GLU_TESS_VERTEX, GLU_TESS_VERTEX_DATA, GLU_TESS_END, GLU_TESS_END_DATA, GLU_TESS_COMBINE, GLU_TESS_COMBINE_DATA, GLU_TESS_ERROR, and GLU_TESS_ERROR_DATA.
which
,
GLUtessellatorCallback
Specifies the callback object to be called.
aCallback
)

gluTessCallback is used to indicate a callback to be used by a tessellation object.

public static final void
gluTessEndContour(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
)

gluTessEndContour and gluTessBeginContour delimit the definition of a polygon contour.

public static final void
gluTessEndPolygon(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
)

gluTessEndPolygon and gluTessBeginPolygon delimit the definition of a convex, concave or self-intersecting polygon.

public static final void
gluTessNormal(GLUtessellator
Specifies the tessellation object (created by gluNewTess).
tessellator
,
double
Specifies the first component of the normal.
x
,
double
Specifies the second component of the normal.
y
,
double
Specifies the third component of the normal.
z
)

gluTessNormal describes a normal for a polygon that the program is defining.

public static final void
gluTessProperty(GLUtessellator
Specifies the tessellation object created with gluNewTess
tessellator
,
int
Specifies the property to be set. Valid values are GLU_TESS_WINDING_RULE, GLU_TESS_BOUNDARDY_ONLY, GLU_TESS_TOLERANCE.
which
,
double
Specifices the value of the indicated property.
value
)

gluTessProperty is used to control properites stored in a tessellation object.

public static final void
gluTessVertex(GLUtessellator
Specifies the tessellation object (created with gluNewTess).
tessellator
,
double[]
Specifies the coordinates of the vertex.
coords
,
int coords_offset, Object
Specifies an opaque reference passed back to the program with the vertex callback (as specified by gluTessCallback).
data
)

gluTessVertex describes a vertex on a polygon that the program defines.

public boolean
gluUnProject(float winX, float winY, float winZ, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float[] 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.

public boolean
gluUnProject(float winX, float winY, float winZ, FloatBuffer model, FloatBuffer proj, IntBuffer view, FloatBuffer 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.

public 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.

public boolean
gluUnProject4(float winX, float winY, float winZ, float clipW, float[] model, int model_offset, float[] proj, int proj_offset, int[] view, int view_offset, float nearVal, float farVal, float[] 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.

public boolean
gluUnProject4(float winX, float winY, float winZ, float clipW, FloatBuffer model, FloatBuffer proj, IntBuffer view, float nearVal, float farVal, FloatBuffer 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.

public 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.

public boolean
isFunctionAvailable(String
the name of the OpenGL function (e.g., use "gluNurbsCallbackDataEXT" to check if the gluNurbsCallbackDataEXT(GLUnurbs, GLvoid) extension is available).
gluFunctionName
)

Returns true if the specified GLU core- or extension-function can be successfully used through this GLU instance.

protected static final void
validateGLUquadricImpl()

Optional, throws GLException if not available in profile

protected static final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait