public class GLUgl2 extends 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 and Description |
---|
GLUgl2()
Instantiates a new OpenGL Utility Library object.
|
Modifier and Type | Method and Description |
---|---|
static GL2 |
getCurrentGL2() |
void |
gluBeginCurve(GLUnurbs r)
Begins a curve definition.
|
void |
gluBeginSurface(GLUnurbs r)
Begins a surface definition.
|
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); |
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); |
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); |
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); |
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); |
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); |
void |
gluEndCurve(GLUnurbs r)
Ends a curve definition.
|
void |
gluEndSurface(GLUnurbs r)
Ends a surface.
|
void |
gluLookAt(double eyeX,
double eyeY,
double eyeZ,
double centerX,
double centerY,
double centerZ,
double upX,
double upY,
double upZ) |
void |
gluLookAt(float eyeX,
float eyeY,
float eyeZ,
float centerX,
float centerY,
float centerZ,
float upX,
float upY,
float upZ) |
GLUnurbs |
gluNewNurbsRenderer()
Creates a new GLUnurbs object.
|
void |
gluNurbsCurve(GLUnurbs r,
int nknots,
float[] knot,
int stride,
float[] ctlarray,
int order,
int type)
Make a NURBS curve.
|
void |
gluNurbsProperty(GLUnurbs r,
int property,
float value)
Sets a property on a NURBS object.
|
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.
|
void |
gluOrtho2D(double left,
double right,
double bottom,
double top) |
void |
gluOrtho2D(float left,
float right,
float bottom,
float top) |
void |
gluPerspective(double fovy,
double aspect,
double zNear,
double zFar) |
void |
gluPerspective(float fovy,
float aspect,
float zNear,
float zFar) |
void |
gluPickMatrix(double x,
double y,
double delX,
double delY,
int[] viewport,
int viewport_offset) |
void |
gluPickMatrix(double x,
double y,
double delX,
double delY,
IntBuffer viewport) |
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); |
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); |
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); |
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); |
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); |
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); |
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); |
boolean |
isFunctionAvailable(String gluFunctionName)
Returns true if the specified GLU core- or extension-function can be
successfully used through this GLU instance.
|
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
public GLUgl2()
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.
public static final GL2 getCurrentGL2() throws GLException
GLException
public final boolean isFunctionAvailable(String gluFunctionName)
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:
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.
gluGetString(GLU_EXTENSIONS)
to see if the function is one of
the extensions that is supported by the underlying GLU implementation.
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.
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)
.isFunctionAvailable
in class GLU
gluFunctionName
- the name of the OpenGL function (e.g., use
"gluNurbsCallbackDataEXT" to check if the
gluNurbsCallbackDataEXT(GLUnurbs, GLvoid)
extension is available).public final void gluOrtho2D(float left, float right, float bottom, float top)
gluOrtho2D
in class GLU
public final void gluOrtho2D(double left, double right, double bottom, double top)
gluOrtho2D
in class GLU
public final void gluPerspective(float fovy, float aspect, float zNear, float zFar)
gluPerspective
in class GLU
public final void gluPerspective(double fovy, double aspect, double zNear, double zFar)
gluPerspective
in class GLU
public final void gluLookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ)
public final void gluLookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
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)
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.
gluProject
in class GLU
public final boolean gluProject(double objX, double objY, double objZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer winPos)
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 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)
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.
gluUnProject
in class GLU
public final boolean gluUnProject(double winX, double winY, double winZ, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, DoubleBuffer objPos)
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 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)
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.
gluUnProject4
in class GLU
public final boolean gluUnProject4(double winX, double winY, double winZ, double clipW, DoubleBuffer model, DoubleBuffer proj, IntBuffer view, double nearVal, double farVal, DoubleBuffer objPos)
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 final void gluPickMatrix(double x, double y, double delX, double delY, int[] viewport, int viewport_offset)
gluPickMatrix
in class GLU
public final void gluPickMatrix(double x, double y, double delX, double delY, IntBuffer viewport)
gluPickMatrix
in class GLU
public final int gluBuild1DMipmapLevels(int target, int internalFormat, int width, int format, int type, int level, int base, int max, Buffer data)
GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
gluBuild1DMipmapLevels
in class GLU
public final int gluBuild1DMipmaps(int target, int internalFormat, int width, int format, int type, Buffer data)
GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void * data);
gluBuild1DMipmaps
in class GLU
public final int gluBuild2DMipmapLevels(int target, int internalFormat, int width, int height, int format, int type, int level, int base, int max, Buffer data)
GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void * data);
gluBuild2DMipmapLevels
in class GLU
public final int gluBuild2DMipmaps(int target, int internalFormat, int width, int height, int format, int type, Buffer data)
GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * data);
gluBuild2DMipmaps
in class GLU
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)
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);
gluBuild3DMipmapLevels
in class GLU
public final int gluBuild3DMipmaps(int target, int internalFormat, int width, int height, int depth, int format, int type, Buffer data)
GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * data);
gluBuild3DMipmaps
in class GLU
public final int gluScaleImage(int format, int wIn, int hIn, int typeIn, Buffer dataIn, int wOut, int hOut, int typeOut, Buffer dataOut)
GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void * dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid * dataOut);
gluScaleImage
in class GLU
public final void gluNurbsProperty(GLUnurbs r, int property, float value)
r
- GLUnurbs object holding NURBS to which a property should be
setproperty
- property idvalue
- property valuepublic final GLUnurbs gluNewNurbsRenderer()
public final void gluBeginCurve(GLUnurbs r)
r
- GLUnurbs object to specify curve topublic final void gluBeginSurface(GLUnurbs r)
r
- GLUnurbs object to specify surface topublic final void gluEndSurface(GLUnurbs r)
r
- GLUnurbs object holding surfacepublic 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)
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 typepublic final void gluNurbsCurve(GLUnurbs r, int nknots, float[] knot, int stride, float[] ctlarray, int order, int type)
r
- GLUnurbs object holding the curvenknots
- number of knotsknot
- knot vectorstride
- number of control point coordinatesctlarray
- control pointsorder
- order of the curvetype
- curve typepublic final void gluEndCurve(GLUnurbs r)
r
- GLUnurbs object holding the curveCopyright 2010 JogAmp Community.