Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

GL Class Reference

List of all members.

Detailed Description

The base OpenGL wrapper class, with a singleton in gl.


Public Member Functions

void alphaFunc (GLenum func, GLclampf ref)
 Assign the alpha test function parameters which is enabled with enable (ALPHA_TEST).

void begin (GLenum mode)
 Start the vertices of a primitive or a group of like primitives, terminated with end (mode is one of POINTS, LINES, LINE_STRIP, LINE_LOOP, TRIANGLES, TRIANGLE_STRIP, TRIANGLE_FAN, QUADS, QUAD_STRIP, or POLYGON.).

void blendEquation (GLenum mode)
 Specify the blend equation.

GLenum blendEquation ()
 Read the blend equation.

void blendFunc (GLenum sfactor, GLenum dfactor)
 Specify the pixel arithmetic.

void clear (GLbitfield mask)
 Clear buffers to preset values (mask is a combination of COLOR_BUFFER_BIT, DEPTH_BUFFER_BIT, ACCUM_BUFFER_BIT, and STENCIL_BUFFER_BIT.).

void clearColor (GLfloat r, GLfloat g, GLfloat b)
 Set the clear color used when calling clear (COLOR_BUFFER_BIT).

void clearColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the clear color used when calling clear (COLOR_BUFFER_BIT).

void clearColor (Color c)
 Set the clear color used when calling clear (COLOR_BUFFER_BIT).

Color clearColor ()
 Get the clear color used when calling clear (COLOR_BUFFER_BIT).

void clearDepth (GLclampd depth)
 Set the clear depth used when calling clear (DETH_BUFFER_BIT).

GLdouble clearDepth ()
 Get the clear depth.

void color (GLfloat r, GLfloat g, GLfloat b)
 Set the color of the next vertex.

void color (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the color of the next vertex.

void color (Color c)
 Set the color of the next vertex.

void colorArray (Color *array, int stride)
 Set the color array; use enable (COLOR_ARRAY) to enable it.

void colorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 Enable or disable writing of frame buffer components.

void colorMaskRed (GLboolean value)
 Enable or disable writing of the red frame buffer component.

GLboolean colorMaskRed ()
 Get whether the red frame buffer component is enabled.

void colorMaskGreen (GLboolean value)
 Enable or disable writing of the green frame buffer component.

GLboolean colorMaskGreen ()
 Get whether the green frame buffer component is enabled.

void colorMaskBlue (GLboolean value)
 Enable or disable writing of the blue frame buffer component.

GLboolean colorMaskBlue ()
 Get whether the blue frame buffer component is enabled.

void colorMaskAlpha (GLboolean value)
 Enable or disable writing of the alpha frame buffer component.

GLboolean colorMaskAlpha ()
 Get whether the alpha frame buffer component is enabled.

void cullFace (GLenum mode)
 Set the current culling face to use when enable (CULL_FACE) (one of FRONT, BACK, or FRONT_AND_BACK).

GLenum cullFace ()
 Get the current culling face.

void depthFunc (GLenum func)
 Set the depth comparison function (func is one of NEVER, LESS, EQUAL, LEQUAL, GREATER, NOTEQUAL, GEQUAL, or ALWAYS).

GLenum depthFunc ()
 Get the current depth comparison function.

void depthRange (GLclampd zNear, GLclampd zFar)
 Specify mapping of depth values from normalized device coordinates to window coordinates.

void disable (GLenum cap)
 Disable a server-side capability.

bit disableAndGet (GLenum cap)
 Disable a server-side capability and return the previous value.

void drawArrays (GLenum mode, GLint first, GLsizei count)
 Draw arrays according to the currently enabled arrays:.

void drawElements (GLenum mode, GLuint[] array)
 Draw an indexed set of elements.

void enable (GLenum cap)
 Enable a server-side capability.

bit enableAndGet (GLenum cap)
 Enable a server-side capability and return the previous value.

void end ()
 Finish the primitives started with begin.

void fogMode (GLenum mode)
 Set the fog mode (mode is one of LINEAR, EXP, and EXP2, initially EXP).

void fogDensity (GLfloat value)
 Set the fog density for exponential mode (value must be non-negative, initially 1.).

void fogDistanceMode (GLenum mode)
 Set the calculation used for determining how far a point is from the camera.

GLenum fogDistanceMode ()
 Get the fog distance calculation.

void fogStart (GLfloat value)
 Set the near plane for the fog in linear fog mode (initially 0.).

GLfloat fogStart ()
 Get the near plane for the fog in linear fog mode.

void fogEnd (GLfloat value)
 Set the far plane for the fog in linear fog mode (initially 1.).

GLfloat fogEnd ()
 Get the far plane for the fog in linear fog mode.

void fogIndex (GLint value)
 Set the color index for the fog (initially 0.).

void fogColor (GLfloat r, GLfloat g, GLfloat b)
 Set the fog color (initially (0, 0, 0, 0).).

void fogColor (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the fog color (initially (0, 0, 0, 0).).

void fogColor (Color c)
 Set the fog color (initially (0, 0, 0, 0).).

GLdouble getDouble (GLenum pname)
 Get a single double of GL state.

GLint getInteger (GLenum pname)
 Get a single integer of GL state.

void frontFace (GLenum mode)
 Set the front face parameter (CW or CCW (the default)).

GLenum frontFace ()
 Get the front face parameter.

void frustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
 Multiply the current matrix by a perspective matrix (stolen from Mesa, thanks guys).

bit getBoolean (GLenum pname)
 Get a single boolean of GL state.

GLfloat getFloat (GLenum pname)
 Get a single float of GL state.

GLlight getLight (GLenum index)
 Get a light; pass a LIGHTi value.

vec3 getVector3f (GLenum pname)
 Get a three-dimensional vector of GL state.

GLenum getError ()
 Get the error value.

GLint getInternalFormat (GLenum format)
 Get the number of channels in the color format.

Color colorFromData (ubyte *data, GLenum format, GLenum type)
 Read a color from data using the given format and type.

void colorToData (ubyte *data, GLenum format, GLenum type, Color color, Color background)
 Write a color in data using the given format and type.

void colorToData (ubyte *data, GLenum format, GLenum type, Color color)
 Write a color in data using the given format and type and a black background.

char[] getString (GLenum name)
 Return a string describing the GL connection (name is one of VENDOR, RENDERER, VERSION, or EXTENSIONS).

GLint getTypeSize (GLenum type)
 Get the number of bytes in a given type (one of UNSIGNED_BYTE, BYTE, UNSIGNED_SHORT, SHORT, UNSIGNED_INT, INT, or FLOAT).

void hintPolygonSmooth (GLenum value)
 Set polygon smooth hinting; value is FASTEST, NICEST, or DONT_CARE.

bit isEnabled (GLenum cap)
 Test whether a server-side capability is enabled.

void lightAmbient (GLenum light, GLfloat r, GLfloat g, GLfloat b)
 Set the ambient color of a light object.

void lightAttenuation (GLenum light, GLfloat constant, GLfloat linear, GLfloat quadratic)
 Set the three attenuation parameters of the light simultaneously.

void lightConstantAttenuation (GLenum light, GLfloat value)
 Set the constant attenuation of the light.

Color lightDiffuse (GLenum light)
 Return the diffuse color of a light object.

void lightDiffuse (GLenum light, GLfloat r, GLfloat g, GLfloat b)
 Set the diffuse color of a light object.

void lightDiffuse (GLenum light, Color c)
 Set the diffuse color of a light object.

void lightLinearAttenuation (GLenum light, GLfloat value)
 Set the linear attenuation of the light.

void lightModelAmbient (GLfloat r, GLfloat g, GLfloat b)
 Set the global ambient color (defaults to (0.2, 0.2, 0.2, 1.0)).

void lightModelAmbient (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the global ambient color (defaults to (0.2, 0.2, 0.2, 1.0)).

void lightModelAmbient (Color c)
 Set the global ambient color.

void lightPosition (GLenum light, GLfloat x, GLfloat y, GLfloat z)
 Set the position of a light object.

vec3 lightPosition (GLenum light)
 Get the position of a light object.

void lightQuadraticAttenuation (GLenum light, GLfloat value)
 Set the quadratic attenuation of the light.

void lightSpecular (GLenum light, GLfloat r, GLfloat g, GLfloat b)
 Set the specular color of a light object.

void lightSpotCutoff (GLenum light, GLfloat angle)
 Set the cutoff angle of the spotlight (0 to 90 degrees, or 180 degrees (default) for a normal light).

void lightSpotDirection (GLenum light, GLfloat x, GLfloat y, GLfloat z)
 Set the normal of the spotlight.

void lightSpotDirection (GLenum light, vec3 v)
 Set the normal of the spotlight.

void lightSpotExponent (GLenum light, GLfloat factor)
 Set the intensity distribution of the spotlight (0 for diffuse, 128 for hard-edged).

void lineWidth (GLfloat value)
 Set the width in pixels of the lines.

GLfloat lineWidth ()
 Get the current line width.

GLfloat lineWidthGranularity ()
 Get the minimum line width difference for a visible change.

GLfloat lineWidthMax ()
 Get the maximum line width.

GLfloat lineWidthMin ()
 Get the minimum line width.

GLlist listNew ()
 Create a new display list object.

GLuint listCreate ()
 Create a display list name.

void listDelete (GLuint list)
 Delete a display list.

void listCompile (GLuint list)
 Start compilation on the list.

void listCompileAndExecute (GLuint list)
 Start compilation on the list and execute at the same time.

void listCompileEnd ()
 Finish compilation.

void listCall (GLuint list)
 Run the display list.

void loadIdentity ()
 Set the current matrix to identity.

void loadIdentity (GLenum mode)
 Set the given matrix to identity without changing the current matrix.

void logicOp (GLenum opcode)
 Specify a logical pixel operation for color rendering.

void materialAmbient (GLenum face, GLfloat r, GLfloat g, GLfloat b)
 Set the ambient material color.

void materialAmbient (GLenum face, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the ambient material color.

void materialAmbient (GLenum face, Color c)
 Set the ambient material color.

Color materialAmbient (GLenum face)
 Get the ambient color of the material.

void materialAmbientAndDiffuse (GLenum face, GLfloat r, GLfloat g, GLfloat b)
 Set the ambient and diffuse material colors to the same value.

void materialAmbientAndDiffuse (GLenum face, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the ambient and diffuse material colors.

void materialAmbientAndDiffuse (GLenum face, Color c)
 Set the ambient and diffuse material colors.

void materialDiffuse (GLenum face, GLfloat r, GLfloat g, GLfloat b)
 Set the diffuse material color.

void materialDiffuse (GLenum face, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the diffuse material color.

void materialDiffuse (GLenum face, Color c)
 Set the diffuse material color.

Color materialDiffuse (GLenum face)
 Get the diffuse color of the material.

void materialEmission (GLenum face, GLfloat r, GLfloat g, GLfloat b)
 Set the material emission color; this is not multiplied against anything, so has a literal effect on color.

void materialEmission (GLenum face, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the material emission color.

void materialEmission (GLenum face, Color c)
 Set the material emission color.

Color materialEmission (GLenum face)
 Get the emission color of the material.

void materialShininess (GLenum face, GLfloat value)
 Set the shininess of the material.

void materialSpecular (GLenum face, GLfloat r, GLfloat g, GLfloat b)
 Set the specular color of the material.

void materialSpecular (GLenum face, GLfloat r, GLfloat g, GLfloat b, GLfloat a)
 Set the specular color of the material.

void materialSpecular (GLenum face, Color c)
 Set the specular color of the material.

Color materialSpecular (GLenum face)
 Get the specular color of the material.

void matrixMode (GLenum mode)
 Set the current matrix mode (mode is one of PROJECTION, MODELVIEW, or TEXTURE.).

GLenum matrixMode ()
 Get the current matrix mode.

GLint maxLights ()
 Get the number of lights supported by the GL; this must be 8.

mat4 modelviewMatrix ()
 Get the modelview matrix.

void multMatrix (mat4 matrix)
 Multiply the current matrix by a matrix.

void normal (GLfloat x, GLfloat y, GLfloat z)
 Set the current normal vector.

void normal (GLfloat[3] v)
 Set the current normal vector.

void normal (vec3 v)
 Set the current normal vector.

vec3 normal ()
 Get the current normal vector.

void normalArray (vec3 *array, int stride)
 Set the normal array; use enable (NORMAL_ARRAY) to enable it.

void perspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
 Sets up a perspective projection matrix (stolen from Mesa, thanks guys).

void pointSize (GLfloat value)
 Specify the diameter of rasterized points (initially 1).

GLfloat pointSize ()
 Get the point size.

void polygonMode (GLenum face, GLenum mode)
 Set a polygon rasterization mode (face is BACK, FRONT, or FRONT_AND_BACK; mode is POINT, LINE, or FILL (the default)).

GLenum polygonMode (GLenum face)
 Get the polygon rasterization mode for a face (face is BACK or FRONT).

void polygonOffset (GLfloat factor, GLfloat units)
 Set the scale and units used to calculate depth values when enable (POLYGON_OFFSET_mode), where mode is FILL, LINE, or POINT.

void popMatrix ()
 Pop a matrix off the current matrix's stack.

mat4 projectionMatrix ()
 Get the projection matrix.

void pushMatrix ()
 Push a matrix onto the current matrix's stack.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLubyte[] data)
 Read a block of pixels from the frame buffer, returning the result.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLbyte[] data)
 Read pixels into an array of bytes.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLushort[] data)
 Read pixels into an array of unsigned shorts.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLshort[] data)
 Read pixels into an array of shorts.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLuint[] data)
 Read pixels into an array of unsigned ints.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLint[] data)
 Read pixels into an array of ints.

void readPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, out GLfloat[] data)
 Read pixels into an array of floats.

void rotate (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
 Rotate the current matrix around an angle.

void rotate (GLfloat angle)
 Rotate the current matrix around (0, 0, 1).

void scale (GLfloat factor)
 Scale the current matrix by a factor.

void scale (GLfloat x, GLfloat y, GLfloat z)
 Scale the current matrix by an amount.

void scale (vec3 v)
 Scale the current matrix by a vector.

void setupPerspective (GLfloat fov, GLfloat aspect, GLfloat near, GLfloat far)
 Setup the matrices to give a perspective mode.

void sphere (GLdouble radius, GLint slices, GLint stacks)
 Render a sphere (stolen from Mesa, thanks guys).

void stencilFunc (GLenum func, GLint ref, GLuint mask)
 Set the function and reference value for stencil testing; func is NEVER, LESS, LEQUAL, GREATER, GEQUAL, EQUAL, NOTEQUAL, and ALWAYS (initial value); ref is the reference value for the stencil test; while mask is the AND mask used for reading and writing the stencil buffer.

void stencilFunc (GLenum func, GLint ref)
 Set the function and reference value for stencil testing; mask is taken to be ~0.

void stencilOp (GLenum fail, GLenum zfail, GLenum zpass)
 Set the effects stencil testing have on the stencil buffer; each is either KEEP, ZERO, REPLACE, INCR, DECR, or INVERT.

void store (GLenum cap, GLenum value)
 Enable or disable the capability depending upon the value.

void texel (vec2 v)
 Set the current texture coordinate.

void texel (float x, float y)
 Set the current texture coordinate.

void texel (GLenum unit, vec2 v)
 Set the current texture coordinate of the given texture unit, in the range TEXTURE0...textureUnitCount.

void texelArray (vec2 *array, int stride)
 Set the texel array; use enable (TEXEL_ARRAY) to enable it.

void texelArray (vec3 *array, int stride)
 Set the texel array; use enable (TEXEL_ARRAY) to enable it.

void texelGenMode (GLenum coord, GLenum param)
 Specify texture coordinate generation mode (coord is S, T, R, or Q; value is OBJECT_LINEAR, EYE_LINEAR, or SPHERE_MAP).

void texelGenObjectPlane (GLenum coord, float distance, float x, float y, float z)
 Indicate the plane to use for texelGenMode (OBJECT_LINEAR).

GLtexture textureNew ()
 Create a new texture object.

GLuint textureCreate ()
 Generate a single texture name.

void textureList (GLuint[] list)
 Generate a number of textures, storing in the array.

void textureBaseLevel (GLfloat value)
 Set the minimum mipmapping level to use with the currently-bound texture (default is zero).

void textureBind (GLuint texture)
 Bind a named texture to the TEXTURE_2D target.

void textureCopyImage (GLint level, GLenum format, GLint x, GLint y, GLint width, GLint height)
 Copy a rectangle of the color buffer into the texture, replacing any data which was in there before.

void textureDelete (GLuint texture)
 Delete a texture.

void textureDelete (GLuint[] textures)
 Delete a list of textures.

void textureEnvMode (GLenum param)
 Assign the texture environment mode.

void textureEnvCombineRGB (GLenum param)
 Assign the color combination function for textureEnvMode (COMBINE) texture environment mode.

void textureEnvSourceRGB (int arg, GLenum param)
 Assign source arguments for the textureEnvCombineRGB function.

GLenum textureEnvSourceRGB (int arg)
 Return the source argument for the textureEnvCombineRGB function.

void textureImage (GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
 Load a two-dimensional texture image into the currently bound texture, simple version.

void textureImage (GLint level, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
 Specify a two-dimensional texture image, including level.

void textureImage (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels)
 Specify a two-dimensional texture image, complex version.

void textureImage (GLint level, GLenum format, out GLubyte[] pixels)
 Read the texture image from GL state, storing it in pixels.

void textureMagFilter (GLenum value)
 Set the magnification filter of the currently-bound texture (either NEAREST or LINEAR).

void textureMinFilter (GLenum value)
 Set the minification filter of the currently-bound texture (one of NEAREST, LINEAR, NEAREST_MIPMAP_NEAREST, LINEAR_MIPMAP_NEAREST, NEAREST_MIPMAP_LINEAR, or LINEAR_MIPMAP_LINEAR).

void texturePriority (GLfloat value)
 Specify the currently bound texture's residence priority, in the range [0, 1], default is 1.

GLfloat texturePriority ()
 Retrieve the currently bound texture's residence priority.

GLint textureWidth ()
 Get the width of the currently-bound texture.

GLint textureWidth (GLint level)
 Get the width of the currently-bound texture at this level.

GLint textureHeight ()
 Get the height of the currently-bound texture.

GLint textureHeight (GLint level)
 Get the height of the currently-bound texture at this level.

GLboolean textureCanGenerateMipmap ()
 Find out whether automatic mipmap generation is available (whether texGenerateMipmap can be used).

GLboolean textureGenerateMipmap (GLboolean value)
 Specify whether to automatically create mipmaps; this is not available on all cards.

mat4 textureMatrix ()
 Get the texture matrix.

void textureUnit (GLenum unit)
 Change the active texturing unit, which is in the range TEXTURE0...textureUnitCount.

GLint textureUnitCount ()
 Return the number of multitexturing units available.

void textureWrapS (GLenum value)
 Sets the wrap parameter for texture coordinate s to either CLAMP or REPEAT.

GLenum textureWrapS ()
 Get the wrap parameter for texture coordinate s.

void textureWrapT (GLenum value)
 Sets the wrap parameter for texture coordinate t to either CLAMP or REPEAT.

GLenum textureWrapT ()
 Get the wrap parameter for texture coordinate t.

void throwError ()
 Retrieve and throw the last error, or return if there is none.

void translate (GLfloat x, GLfloat y)
 Translate the current matrix.

void translate (GLfloat x, GLfloat y, GLfloat z)
 Translate the current matrix.

void translate (vec3 vec)
 Translate the current matrix.

void translate (vec2 vec)
 Translate the current matrix.

vec3 unproject (vec2 point)
 Transform screen coordinates into object-space coordinates.

vec3 unproject (vec3 point)
 Transform screen coordinates into object-space coordinates.

void vertex (GLfloat x, GLfloat y)
 Store a two-dimensional vertex.

void vertex (vec2 v)
 Store a two-dimensional vertex.

void vertex (GLfloat x, GLfloat y, GLfloat z)
 Store a three-dimensional vertex.

void vertex (vec3 v)
 Store a three-dimensional vertex.

void vertex (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 Store a four-dimensional vertex.

void vertexArray (vec3 *array, int stride)
 Set the vertex array; use enable (VERTEX_ARRAY) to enable it.

void viewport (GLint x, GLint y, GLsizei width, GLsizei height)
 Set the viewport area.

void viewportArea (out GLint x, out GLint y, out GLsizei width, out GLsizei height)
 Get the viewport area.


Member Function Documentation

void GL.alphaFunc GLenum  func,
GLclampf  ref
 

Assign the alpha test function parameters which is enabled with enable (ALPHA_TEST).

When enabled, fragments which fail the test, which is between the fragment's alpha and a reference value, will not be rendered at all. This is most often used to give a sharp line to vegetation and cloth. The possible values for test are, where alpha is the fragment's alpha and ref is the reference value passed to this function:

  • NEVER: Never passes (false).
  • LESS: alpha < ref.
  • EQUAL: alpha == ref.
  • LEQUAL: alpha <= ref.
  • GREATER: alpha > ref.
  • NOTEQUAL: alpha != ref.
  • GEQUAL: alpha >= ref.
  • ALWAYS: Always passes (true).

The default is (ALWAYS, 0).

void GL.blendEquation GLenum  mode  ) 
 

Specify the blend equation.

This determines how the two colors that result from blendFunc are combined into one. The possible values are, where S is the source color and D is the destination color:

  • FUNC_ADD (default): S + D.
  • FUNC_MIN: min (S, D).
  • FUNC_MAX: max (S, D).
  • FUNC_SUBTRACT: S - D.
  • FUNC_REVERSE_SUBTRACT: D - S.

blendEquation is not supported on all hardware. If it isn't, writing to it has no effect on the value.

void GL.blendFunc GLenum  sfactor,
GLenum  dfactor
 

Specify the pixel arithmetic.

The sfactor is how the source blending color is computed; the source color is the fragment being drawn. The dfactor is how the destination blending color is computed; the destination color is the color buffer value. How these results are combined to form the output color depends upon the setting of blendEquation.

In the following list of allowable sfactor and dfactor values, I give the color the parameter is multiplied against. S is the source color (Sr, Sg, Sb, and Sa its components), D is the destination color.

  • ZERO: (0, 0, 0, 0).
  • ONE: (1, 1, 1, 1).
  • SRC_COLOR: S (dfactor only).
  • ONE_MINUS_SRC_COLOR (1 - Sr, 1 - Sg, 1 - Sb, 1 - Sa) (dfactor only).
  • DST_COLOR: D (sfactor only).
  • ONE_MINUS_DST_COLOR (1 - Sr, 1 - Sg, 1 - Sb, 1 - Sa) (sfactor only).
  • SRC_ALPHA: (Sa, Sa, Sa, Sa).
  • ONE_MINUS_SRC_ALPHA: (1 - Sa, 1 - Sa, 1 - Sa, 1 - Sa).
  • DST_ALPHA: (Da, Da, Da, Da).
  • ONE_MINUS_DST_ALPHA: (1 - Da, 1 - Da, 1 - Da, 1 - Da).
  • SRC_ALPHA_SATURATE: Where (f = min (Sa, 1 - Da)), (f, f, f, 1).

For this to have any effect, enable (BLEND) must be set.

void GL.clearDepth GLclampd  depth  ) 
 

Set the clear depth used when calling clear (DETH_BUFFER_BIT).

The initial value is 1, and input is clamped to the range [0, 1].

void GL.colorArray Color array,
int  stride
 

Set the color array; use enable (COLOR_ARRAY) to enable it.

#a stride should be zero to indicate 4 (the size of the cell) or the number of bytes between each entry.

void GL.colorMask GLboolean  red,
GLboolean  green,
GLboolean  blue,
GLboolean  alpha
 

Enable or disable writing of frame buffer components.

Disabling a component means that it will not be modified by any drawing operation.

void GL.depthFunc GLenum  func  ) 
 

Set the depth comparison function (func is one of NEVER, LESS, EQUAL, LEQUAL, GREATER, NOTEQUAL, GEQUAL, or ALWAYS).

This determines whether a fragment wins the contest with the current depth buffer point. func is one of:

  • NEVER: Never passes.
  • LESS (default): Passes if the incoming depth value is less than the stored depth value.
  • EQUAL: Passes if the incoming depth value is equal to the stored depth value.
  • LEQUAL: Passes if the incoming depth value is less than or equal to the stored depth value.
  • GREATER: Passes if the incoming depth value is greater than the stored depth value.
  • NOTEQUAL: Passes if the incoming depth value is not equal to the stored depth value.
  • GEQUAL: Passes if the incoming depth value is greater than or equal to the stored depth value.
  • ALWAYS: Always passes.

void GL.depthRange GLclampd  zNear,
GLclampd  zFar
 

Specify mapping of depth values from normalized device coordinates to window coordinates.

The initial parameters are 0 and 1, indicating full utilisation of the depth buffer. It is not necessary for zNear to be below zFar.

void GL.disable GLenum  cap  ) 
 

Disable a server-side capability.

See enable.

void GL.drawArrays GLenum  mode,
GLint  first,
GLsizei  count
 

Draw arrays according to the currently enabled arrays:.

void GL.drawElements GLenum  mode,
GLuintarray  []
 

Draw an indexed set of elements.

This draws a single primitive based on the currently enabled arrays (see drawArrays for a summary). mode is the type of primitive to draw, and array is the indices into the enabled arrays.

void GL.enable GLenum  cap  ) 
 

Enable a server-side capability.

cap is one of:

  • ALPHA_TEST: If enabled, do alpha testing. See alphaFunc.
  • AUTO_NORMAL: If enabled, generate normal vectors when either MAP2_VERTEX_3 or MAP2_VERTEX_4 is used to generate vertices. See map2.
  • BLEND: If enabled, blend the incoming RGBA color values with the values in the color buffers. See blendFunc.
  • CLIP_PLANEi: If enabled, clip geometry against user-defined clipping plane i. See #clipPlane.
  • COLOR_LOGIC_OP: If enabled, apply the currently selected logical operation to the incoming RGBA color and color buffer values. See logicOp.
  • COLOR_MATERIAL: If enabled, have one or more material parameters track the current color. See #colorMaterial.
  • CULL_FACE: If enabled, cull polygons based on their winding in window coordinates. See cullFace.
  • DEPTH_TEST: If enabled, do depth comparisons and update the depth buffer. Note that even if the depth buffer exists and the depth mask is non-zero, the depth buffer is not updated if the depth test is disabled. See depthFunc and depthRange.
  • DEPTH_WRITEMASK: If enabled (the default) and DEPTH_TEST is also enabled, write to the depth buffer.
  • DITHER: If enabled, dither color components or indices before they are written to the color buffer.
  • FOG: If enabled, blend a fog color into the posttexturing color. See fogMode, fogDensity, fogDistanceMode, fogStart, fogEnd, fogIndex, and fogColor.
  • INDEX_LOGIC_OP: If enabled, apply the currently selected logical operation to the incoming index and color buffer indices. See logicOp.
  • LIGHT_MODEL_LOCAL_VIEWER: If disabled, specular reflection angles take the view direction to be parallel to and in the direction of the -z axis, regardless of the location of the vertex in eye coordinates. Otherwise, specular reflections are computed from the origin of the eye coordinate system.
  • LIGHT_MODEL_TWO_SIDE: If enabled, use the BACK material parameters when the polygon is back-facing the lights.
  • LIGHTi: If enabled, include light i in the evaluation of the lighting equation. See #lightModel and #light.
  • LIGHTING: If enabled, use the current lighting parameters to compute the vertex color or index. Otherwise, simply associate the current color or index with each vertex. See #material, #lightModel, and #light.
  • LINE_SMOOTH: If enabled, draw lines with correct filtering. Otherwise, draw aliased lines. See lineWidth.
  • LINE_STIPPLE: If enabled, use the current line stipple pattern when drawing lines. See #lineStipple.
  • MAP1_COLOR_4: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate RGBA values. See #map1.
  • MAP1_INDEX: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate color indices. See #map1.
  • MAP1_NORMAL: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate normals. See #map1.
  • MAP1_TEXTURE_COORD_1: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate s texture coordinates. See #map1.
  • MAP1_TEXTURE_COORD_2: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate s and t texture coordinates. See #map1.
  • MAP1_TEXTURE_COORD_3: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate s, t, and r texture coordinates. See #map1.
  • MAP1_TEXTURE_COORD_4: If enabled, calls to #valCoord1, #evalMesh1, and #evalPoint1 generate s, t, r, and q texture coordinates. See #map1.
  • MAP1_VERTEX_3: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate x, y, and z vertex coordinates. See #map1.
  • MAP1_VERTEX_4: If enabled, calls to #evalCoord1, #evalMesh1, and #evalPoint1 generate homogeneous x, y, z, and w vertex coordinates. See #map1.
  • MAP2_COLOR_4: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate RGBA values. See #map2.
  • MAP2_INDEX: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate color indices. See #map2.
  • MAP2_NORMAL: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate normals. See #map2.
  • MAP2_TEXTURE_COORD_1: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate s texture coordinates. See #map2.
  • MAP2_TEXTURE_COORD_2: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate s and t texture coordinates. See #map2.
  • MAP2_TEXTURE_COORD_3: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate s, t, and r texture coordinates. See #map2.
  • MAP2_TEXTURE_COORD_4: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate s, t, r, and q texture coordinates. See #map2.
  • MAP2_VERTEX_3: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate x, y, and z vertex coordinates. See #map2.
  • MAP2_VERTEX_4: If enabled, calls to #evalCoord2, #evalMesh2, and #evalPoint2 generate homogeneous x, y, z, and w vertex coordinates. See #map2.
  • NORMALIZE: If enabled, normal vectors specified with normal are scaled to unit length after transformation. See normal.
  • POINT_SMOOTH: If enabled, draw points with proper filtering. Otherwise, draw aliased points. See pointSize.
  • POLYGON_OFFSET_FILL: If enabled, and if the polygon is rendered in FILL mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See polygonOffset.
  • POLYGON_OFFSET_LINE: If enabled, and if the polygon is rendered in LINE mode, an offset is added to depth values of a polygon's fragments before the depth comparison is performed. See polygonOffset.
  • POLYGON_OFFSET_POINT: If enabled, an offset is added to depth values of a polygon's fragments before the depth comparison is performed, if the polygon is rendered in POINT mode. See polygonOffset.
  • POLYGON_SMOOTH: If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct anti-aliased polygons, an alpha buffer is needed and the polygons must be sorted front to back.
  • POLYGON_STIPPLE: If enabled, use the current polygon stipple pattern when rendering polygons. See #polygonStipple.
  • SCISSOR_TEST: If enabled, discard fragments that are outside the scissor rectangle. See #scissor.
  • SEPARATE_SPECULAR_COLOR: If enabled, add the specular color after multiplying the light color by the texture color. Otherwise, multiply them all together. Enabling this results in proper blending of the specular highlight when texturing. It has no effect when not texturing.
  • STENCIL_TEST: If enabled, do stencil testing and update the stencil buffer. See stencilFunc and stencilOp.
  • TEXTURE_1D: If enabled, one-dimensional texturing is performed (unless two-dimensional texturing is also enabled). See #texImage1D.
  • TEXTURE_2D: If enabled, two-dimensional texturing is performed. See #texImage2D.
  • TEXTURE_GEN_Q: If enabled, the q texture coordinate is computed using the texture generation function defined with #texGen. Otherwise, the current q texture coordinate is used. See #texGen.
  • TEXTURE_GEN_R: If enabled, the r texture coordinate is computed using the texture generation function defined with #texGen. Otherwise, the current r texture coordinate is used. See #texGen.
  • TEXTURE_GEN_S: If enabled, the s texture coordinate is computed using the texture generation function defined with #texGen. Otherwise, the current s texture coordinate is used. See #texGen.
  • TEXTURE_GEN_T: If enabled, the t texture coordinate is computed using the texture generation function defined with #texGen. Otherwise, the current t texture coordinate is used. See #texGen.

void GL.fogDistanceMode GLenum  mode  ) 
 

Set the calculation used for determining how far a point is from the camera.

This depends upon extensions; currently NV_fog_distance. The setting can be:

  • EYE_PLANE (default): The distance is computed as the distance from the eye plane.

  • EYE_RADIAL: The distance is computed as the Euclidean distance from the eye.

  • EYE_PLANE_ABSOLUTE: As with the above, but using abs.

void GL.fogMode GLenum  mode  ) 
 

Set the fog mode (mode is one of LINEAR, EXP, and EXP2, initially EXP).

Where e is the value of fogEnd, s is the value of fogStart, z is the depth of a point, and f is the blending factor, the equation for each mode is:

  • LINEAR: f = (e - z) / (e - s)

  • EXP: f = exp (-d * z)

  • EXP2: f = exp (-(d * z) ^ 2)

These are then clamped to the [0, 1] range and used to interpolate between transparent (0) and the fog color (1).

void GL.frontFace GLenum  mode  ) 
 

Set the front face parameter (CW or CCW (the default)).

This controls which material parameters are used as well as whether this results in culling, depending upon whether CULL_FACE is enabled.

void GL.frustum GLdouble  left,
GLdouble  right,
GLdouble  bottom,
GLdouble  top,
GLdouble  zNear,
GLdouble  zFar
 

Multiply the current matrix by a perspective matrix (stolen from Mesa, thanks guys).

left and right are the coordinates for the vertical clipping planes. bottom and top are the coordinates for the horizontal clipping planes.

zNear and zFar are the distances to the near and far depth clipping planes. Depth buffer precision is affected by the values specified for zNear and zFar. The greater the ratio of zFar to zNear is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other.

char [] GL.getString GLenum  name  ) 
 

Return a string describing the GL connection (name is one of VENDOR, RENDERER, VERSION, or EXTENSIONS).

  • VENDOR: Returns the company responsible for this GL implementation. This name does not change from release to release.

  • RENDERER: Returns the name of the renderer. This name is typically specific to a particular configuration of a hardware platform. It does not change from release to release.

  • VERSION: Returns a version or release number.

  • EXTENSIONS: Returns a space-separated list of supported extensions to GL.

void GL.lightSpotDirection GLenum  light,
GLfloat  x,
GLfloat  y,
GLfloat  z
 

Set the normal of the spotlight.

It does not need to be normalized.

void GL.logicOp GLenum  opcode  ) 
 

Specify a logical pixel operation for color rendering.

This logic operation blends the final fragment color with the color buffer value when enable (COLOR_LOGIC_OP). A warning: this is more than likely not accelerated on your hardware. In the following, s is a bit from the source color d is a bit from the frame buffer color. The valid values for opcode and their operations are:

  • CLEAR: 0
  • SET: 1
  • COPY: s
  • COPY_INVERTED: ~s
  • NOOP: d
  • INVERT: ~d
  • AND: s & d
  • NAND: ~(s & d)
  • OR: s | d
  • NOR: ~(s | d)
  • XOR: s ^ d
  • EQUIV: ~(s ^ d)
  • AND_REVERSE: s & ~d
  • AND_INVERTED: ~s & d
  • OR_REVERSE: s | ~d
  • OR_INVERTED: ~s | d

void GL.normal GLfloat  x,
GLfloat  y,
GLfloat  z
 

Set the current normal vector.

If !isEnabled (NORMALIZE), the default, then the vector is not normalized after translation.

void GL.normalArray vec3 array,
int  stride
 

Set the normal array; use enable (NORMAL_ARRAY) to enable it.

#a stride should be zero to indicate 12 (the size of the array) or the number of bytes between each entry.

void GL.polygonMode GLenum  face,
GLenum  mode
 

Set a polygon rasterization mode (face is BACK, FRONT, or FRONT_AND_BACK; mode is POINT, LINE, or FILL (the default)).

This controls the interpretation of polygons for rasterization.

  • POINT: Polygon vertices that are marked as the start of a boundary edge are drawn as points. Point attributes such as pointSize and enable (POINT_SMOOTH) control the rasterization of the points. Polygon rasterization attributes other than polygonMode have no effect.
  • LINE: Boundary edges of the polygon are drawn as line segments. They are treated as connected line segments for line stippling; the line stipple counter and pattern are not reset between segments (see #lineStipple). Line attributes such as lineWidth and enable (LINE_SMOOTH control the rasterization of the lines. Polygon rasterization attributes other than polygonMode have no effect.
  • FILL: The interior of the polygon is filled. Polygon attributes such as #polygonStipple and enable (POLYGON_SMOOTH) control the rasterization of the polygon.

void GL.readPixels GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height,
GLenum  format,
out  GLubytedata[]
 

Read a block of pixels from the frame buffer, returning the result.

x and y are the coordinates (a y of zero is the bottom line), width and height are the dimensions to read, and format is the buffer to read from, and can be COLOR_INDEX, STENCIL_INDEX, DEPTH_COMPONENT, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, and LUMINANCE_ALPHA. The result is stored in data. Values for pixels that are not in range are undefined.

void GL.stencilFunc GLenum  func,
GLint  ref,
GLuint  mask
 

Set the function and reference value for stencil testing; func is NEVER, LESS, LEQUAL, GREATER, GEQUAL, EQUAL, NOTEQUAL, and ALWAYS (initial value); ref is the reference value for the stencil test; while mask is the AND mask used for reading and writing the stencil buffer.

Stencil testing is enabled with enable (STENCIL_TEST), and the effect on the stencil buffer from the test is controlled with stencilOp. func is one of:

  • NEVER: Always fails.
  • LESS: Passes if (ref & mask) < (stencil & mask).
  • LEQUAL: Passes if (ref & mask) < (stencil & mask).
  • GREATER: Passes if (ref & mask) > (stencil & mask).
  • GEQUAL: Passes if (ref & mask) > (stencil & mask).
  • EQUAL: Passes if (ref & mask) = (stencil & mask).
  • NOTEQUAL: Passes if (ref & mask) / (stencil & mask).
  • ALWAYS: Always passes.

void GL.stencilOp GLenum  fail,
GLenum  zfail,
GLenum  zpass
 

Set the effects stencil testing have on the stencil buffer; each is either KEEP, ZERO, REPLACE, INCR, DECR, or INVERT.

Stencil testing is enabled with enable (STENCIL_TEST), and the test is controlled with stencilFunc.

The fail action is taken when the stencil test fails. The zfail action is taken when the stencil test passes, but the depth test fails. zpass is taken when both the stencil test and the depth test pass, or when the stencil test passes and there is no depth buffer or it is not enabled. The actions are:

  • KEEP: Keeps the current value.
  • ZERO: Sets the stencil buffer value to 0.
  • REPLACE: Sets the stencil buffer value to ref, as specified by stencilFunc.
  • INCR: Increments the current stencil buffer value. Clamps to the maximum representable unsigned value.
  • DECR: Decrements the current stencil buffer value. Clamps to 0.
  • INVERT: Bitwise inverts the current stencil buffer value.

void GL.texelArray vec3 array,
int  stride
 

Set the texel array; use enable (TEXEL_ARRAY) to enable it.

#a stride should be zero to indicate 12 (the size of the cell) or the number of bytes between each entry.

void GL.texelArray vec2 array,
int  stride
 

Set the texel array; use enable (TEXEL_ARRAY) to enable it.

#a stride should be zero to indicate 8 (the size of the cell) or the number of bytes between each entry.

void GL.texelGenMode GLenum  coord,
GLenum  param
 

Specify texture coordinate generation mode (coord is S, T, R, or Q; value is OBJECT_LINEAR, EYE_LINEAR, or SPHERE_MAP).

Texture coordinate generation is enabled using TEXTURE_GEN_S, TEXTURE_GEN_T, TEXTURE_GEN_R, and TEXTURE_GEN_Q.

  • OBJECT_LINEAR: The texture coordinate is the distance of the point from the plane specified in #textureGenObjectPlane.
  • EYE_LINEAR: TODO.
  • SPHERE_MAP: The texture coordinate is selected based on a sphere map.

void GL.textureBaseLevel GLfloat  value  ) 
 

Set the minimum mipmapping level to use with the currently-bound texture (default is zero).

Controlling the mipmapping level can be used for visual effects, and to partially load a texture that is far away or very recently in use, and only load the real texture later.

void GL.textureCopyImage GLint  level,
GLenum  format,
GLint  x,
GLint  y,
GLint  width,
GLint  height
 

Copy a rectangle of the color buffer into the texture, replacing any data which was in there before.

level is the mipmapping level to read from. format is the texture format to store and can be ALPHA, LUMINANCE, LUMINANCE_ALPHA, INTENSITY, RGB, RGBA, or a number of more obscure modes. x and y are the starting coordinates for the color buffer rectangle; a y of zero is the bottom row of the buffer. width and height are the dimensions of the rectangle and must be powers of two.

void GL.textureEnvCombineRGB GLenum  param  ) 
 

Assign the color combination function for textureEnvMode (COMBINE) texture environment mode.

This can be REPLACE (arg0), MODULATE (arg0 * arg1), ADD (arg0 + arg1), ADD_SIGNED (arg0 + arg1 - 0.5), INTERPOLATE (arg0 * arg2 + arg1 * (1 - arg2)), or SUBTRACT (arg0 - arg1). arg0, arg1, and arg2 are assigned through two factors: textureEnvSourceRGB and #textureEnvOperandRGB, where 0 is 0, 1, or 2. The default is MODULATE.

void GL.textureEnvMode GLenum  param  ) 
 

Assign the texture environment mode.

This can be MODULATE, DECAL, BLEND, REPLACE, or COMBINE. The default is MODULATE.

void GL.textureEnvSourceRGB int  arg,
GLenum  param
 

Assign source arguments for the textureEnvCombineRGB function.

Arg is the argument to modify (0, 1, or 2), and param is the value. This can be TEXTURE (read from the texture), CONSTANT (use a constant color), PRIMARY_COLOR (use the main color or the light color computation if enable (LIGHTING)), PREVIOUS (the color from the previous texturing unit, see textureUnit). The defaults are TEXTURE, PREVIOUS, and CONSTANT for the three arguments.

GLboolean GL.textureGenerateMipmap GLboolean  value  ) 
 

Specify whether to automatically create mipmaps; this is not available on all cards.

It must be enabled before uploading the texture and returns whether it was successful.

void GL.textureImage GLenum  target,
GLint  level,
GLint  internalformat,
GLsizei  width,
GLsizei  height,
GLint  border,
GLenum  format,
GLenum  type,
GLvoid *  pixels
 

Specify a two-dimensional texture image, complex version.

See OpenGL documentation for glTexImage2D for details.

void GL.textureImage GLint  level,
GLsizei  width,
GLsizei  height,
GLenum  format,
GLenum  type,
GLvoid *  pixels
 

Specify a two-dimensional texture image, including level.

The level is the mipmapping level this image is inserted into. 0 is the base image; n is the nth mipmap reduction.

void GL.textureImage GLsizei  width,
GLsizei  height,
GLenum  format,
GLenum  type,
GLvoid *  pixels
 

Load a two-dimensional texture image into the currently bound texture, simple version.

width and height are the dimensions of the texture in pixels. format is the provided channels and can be COLOR_INDEX, RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, and LUMINANCE_ALPHA. type is the data type and can be UNSIGNED_BYTE (GLubyte), BYTE (GLbyte), BITMAP (compressed bits, format must be COLOR_INDEX), UNSIGNED_SHORT (GLushort), SHORT (GLshort), UNSIGNED_INT (GLuint), INT (GLint), and FLOAT (GLfloat). pixels is the array to read from; if null, the texture dimensions are set but are not cleared.

The image is loaded from the bottom up, so the first pixel in the pixels array is the bottom-left one.

If the width and height are not powers of two (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, or 8192), the image is first resized to the nearest demarcation. Then it is checked whether it fits, and is progressively halved in size until it does. Mipmaps are automatically generated, either manually or by extension.

void GL.textureMagFilter GLenum  value  ) 
 

Set the magnification filter of the currently-bound texture (either NEAREST or LINEAR).

The magnification filter is used when the pixel is smaller than a texture element. It can be one of:

  • NEAREST: Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.
  • LINEAR: Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of textureWrapS and textureWrapT, and on the exact mapping.

void GL.textureMinFilter GLenum  value  ) 
 

Set the minification filter of the currently-bound texture (one of NEAREST, LINEAR, NEAREST_MIPMAP_NEAREST, LINEAR_MIPMAP_NEAREST, NEAREST_MIPMAP_LINEAR, or LINEAR_MIPMAP_LINEAR).

The minification filter is used when the pixel is larger than a texture element. It can be one of:

  • NEAREST: Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.
  • LINEAR: Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can include border texture elements, depending on the values of textureWrapS and textureWrapT, and on the exact mapping.
  • NEAREST_MIPMAP_NEAREST: Chooses the mipmap that most closely matches the size of the pixel being textured and uses the NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value.
  • LINEAR_MIPMAP_NEAREST: Chooses the mipmap that most closely matches the size of the pixel being textured and uses the LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value.
  • NEAREST_MIPMAP_LINEAR: Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.
  • LINEAR_MIPMAP_LINEAR: Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

LINEAR is often called bilinear filtering, while LINEAR_MIPMAP_LINEAR is often called trilinear filtering. NEAREST and LINEAR are often slower than the other forms due to what's called cache thrashing: too much access to widely spaced sections of memory.

GLint GL.textureUnitCount  ) 
 

Return the number of multitexturing units available.

You can switch the current texture unit using textureUnit and can enable or disable individual units using enable (TEXTURE0...32).

void GL.textureWrapS GLenum  value  ) 
 

Sets the wrap parameter for texture coordinate s to either CLAMP or REPEAT.

CLAMP causes s coordinates to be clamped to the range [0, 1] and is useful for preventing wrapping artifacts when mapping a single image onto an object. REPEAT causes the integer part of the s coordinate to be ignored; the GL uses only the fractional part, thereby creating a repeating pattern. Border texture elements are accessed only if wrapping is set to CLAMP. Initially, textureWrapS is set to REPEAT.

void GL.textureWrapT GLenum  value  ) 
 

Sets the wrap parameter for texture coordinate t to either CLAMP or REPEAT.

CLAMP causes t coordinates to be clamped to the range [0, 1] and is useful for preventing wrapping artifacts when mapping a single image onto an object. REPEAT causes the integer part of the t coordinate to be ignored; the GL uses only the fractional part, thereby creating a repeating pattern. Border texture elements are accessed only if wrapping is set to CLAMP. Initially, textureWrapT is set to REPEAT.

void GL.vertexArray vec3 array,
int  stride
 

Set the vertex array; use enable (VERTEX_ARRAY) to enable it.

#a stride should be zero to indicate 8 (the size of the array) or the number of bytes between each entry.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:52 2003 for dig by doxygen 1.3.2