OpenGL glue. All method and constant names have been kept close to their low level counterparts for easy adoption of OpenGL code from other languages and examples off the web. Superfluous suffixes specifying the number and types of arguments have been dropped, though.
All OpenGL methods have not been implemented. For a list of
unimplemented methods, see glUnimplemented.
constant int GL.GL_2D
Used in glFeedbackBuffer
constant int GL.GL_2_BYTES
constant int GL.GL_3D
Used in glFeedbackBuffer
constant int GL.GL_3D_COLOR
Used in glFeedbackBuffer
constant int GL.GL_3D_COLOR_TEXTURE
Used in glFeedbackBuffer
constant int GL.GL_3_BYTES
constant int GL.GL_4D_COLOR_TEXTURE
Used in glFeedbackBuffer
constant int GL.GL_4_BYTES
constant int GL.GL_ABGR_EXT
constant int GL.GL_ACCUM
Used in glAccum
constant int GL.GL_ACCUM_ALPHA_BITS
Used in glAccum and glGet
constant int GL.GL_ACCUM_BLUE_BITS
Used in glAccum and glGet
constant int GL.GL_ACCUM_BUFFER_BIT
Used in glClear and glPushAttrib
constant int GL.GL_ACCUM_CLEAR_VALUE
Used in glClear, glClearAccum and glGet
constant int GL.GL_ACCUM_GREEN_BITS
Used in glAccum and glGet
constant int GL.GL_ACCUM_RED_BITS
Used in glAccum and glGet
constant int GL.GL_ACTIVE_TEXTURE
Used in glGet
constant int GL.GL_ACTIVE_TEXTURE_ARB
constant int GL.GL_ADD
Used in glAccum and glTexEnv
constant int GL.GL_ADD_SIGNED
Used in glTexEnv
constant int GL.GL_ALIASED_LINE_WIDTH_RANGE
Used in glGet and glLineWidth
constant int GL.GL_ALIASED_POINT_SIZE_RANGE
Used in glGet and glPointSize
constant int GL.GL_ALL_ATTRIB_BITS
Used in glPushAttrib
constant int GL.GL_ALL_CLIENT_ATTRIB_BITS
constant int GL.GL_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexEnv, glTexImage1D,
glTexImage2D, glTexParameter, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_ALPHA12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_ALPHA16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_ALPHA4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_ALPHA8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_ALPHA_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_ALPHA_BITS
Used in glGet
constant int GL.GL_ALPHA_BLEND_EQUATION_ATI
constant int GL.GL_ALPHA_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexEnv, glTexImage1D and glTexImage2D
constant int GL.GL_ALPHA_TEST
Used in glAlphaFunc, glEnable, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_ALPHA_TEST_FUNC
Used in glAlphaFunc and glGet
constant int GL.GL_ALPHA_TEST_REF
Used in glAlphaFunc and glGet
constant int GL.GL_ALWAYS
Used in glAlphaFunc, glDepthFunc, glGet, glStencilFunc and
glTexParameter
constant int GL.GL_AMBIENT
Used in glColorMaterial, glLight and glMaterial
constant int GL.GL_AMBIENT_AND_DIFFUSE
Used in glColorMaterial, glGet and glMaterial
constant int GL.GL_AND
Used in glLogicOp
constant int GL.GL_AND_INVERTED
Used in glLogicOp
constant int GL.GL_AND_REVERSE
Used in glLogicOp
constant int GL.GL_ARB_imaging
constant int GL.GL_ARB_multitexture
constant int GL.GL_ARB_texture_non_power_of_two
Used in glCopyTexImage1D, glTexImage1D and glTexImage2D
constant int GL.GL_ARRAY_BUFFER
Used in glColorPointer, glEdgeFlagPointer, glGet,
glIndexPointer, glNormalPointer, glTexCoordPointer and
glVertexPointer
constant int GL.GL_ARRAY_BUFFER_BINDING
Used in glColorPointer, glEdgeFlagPointer, glGet,
glIndexPointer, glNormalPointer, glTexCoordPointer and
glVertexPointer
constant int GL.GL_ATI_blend_equation_separate
constant int GL.GL_ATTRIB_STACK_DEPTH
Used in glGet, glPushAttrib and glPushClientAttrib
constant int GL.GL_AUTO_NORMAL
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_AUX0
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_AUX1
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_AUX2
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_AUX3
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_AUX_BUFFERS
Used in glDrawBuffer, glGet and glReadBuffer
constant int GL.GL_AVERAGE_EXT
constant int GL.GL_BACK
Used in glColorMaterial, glCullFace, glDrawBuffer, glGet,
glMaterial, glPolygonMode and glReadBuffer
constant int GL.GL_BACK_LEFT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_BACK_RIGHT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_BGR
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_BGRA
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_BITMAP
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_BITMAP_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_BLEND
Used in glBlendFunc, glEnable, glGet, glIsEnabled,
glPushAttrib and glTexEnv
constant int GL.GL_BLEND_COLOR
Used in glGet
constant int GL.GL_BLEND_COLOR_EXT
constant int GL.GL_BLEND_DST
Used in glBlendFunc
constant int GL.GL_BLEND_DST_ALPHA
Used in glGet
constant int GL.GL_BLEND_DST_RGB
Used in glGet
constant int GL.GL_BLEND_EQUATION
Used in glGet
constant int GL.GL_BLEND_EQUATION_ALPHA
Used in glGet
constant int GL.GL_BLEND_EQUATION_EXT
constant int GL.GL_BLEND_EQUATION_RGB
Used in glGet
constant int GL.GL_BLEND_SRC
Used in glBlendFunc
constant int GL.GL_BLEND_SRC_ALPHA
Used in glGet
constant int GL.GL_BLEND_SRC_RGB
Used in glGet
constant int GL.GL_BLUE
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_BLUE_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_BLUE_BITS
Used in glGet
constant int GL.GL_BLUE_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_BYTE
Used in glColorPointer, glDrawPixels, glGetTexImage,
glNormalPointer, glReadPixels, glTexImage1D, glTexImage2D,
glTexSubImage1D and glTexSubImage2D
constant int GL.GL_C3F_V3F
Used in glInterleavedArrays
constant int GL.GL_C4F_N3F_V3F
Used in glInterleavedArrays
constant int GL.GL_C4UB_V2F
Used in glInterleavedArrays
constant int GL.GL_C4UB_V3F
Used in glInterleavedArrays
constant int GL.GL_CCW
Used in glFrontFace and glGet
constant int GL.GL_CLAMP
Used in glTexParameter
constant int GL.GL_CLAMP_TO_BORDER
Used in glTexParameter
constant int GL.GL_CLAMP_TO_EDGE
Used in glTexParameter
constant int GL.GL_CLEAR
Used in glLogicOp
constant int GL.GL_CLIENT_ACTIVE_TEXTURE
Used in glGet
constant int GL.GL_CLIENT_ACTIVE_TEXTURE_ARB
constant int GL.GL_CLIENT_ALL_ATTRIB_BITS
Used in glPushClientAttrib
constant int GL.GL_CLIENT_ATTRIB_STACK_DEPTH
Used in glGet
constant int GL.GL_CLIENT_PIXEL_STORE_BIT
Used in glPushClientAttrib
constant int GL.GL_CLIENT_VERTEX_ARRAY_BIT
Used in glPushClientAttrib
constant int GL.GL_CLIP_PLANE0
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_CLIP_PLANE1
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_CLIP_PLANE2
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_CLIP_PLANE3
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_CLIP_PLANE4
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_CLIP_PLANE5
Used in glClipPlane, glEnable, glGet and glIsEnabled
constant int GL.GL_COEFF
constant int GL.GL_COLOR
Used in glCopyPixels, glMatrixMode and glPushMatrix
constant int GL.GL_COLOR_ARRAY
Used in glColorPointer, glDrawArrays, glDrawElements,
glEnableClientState, glGet and glIsEnabled
constant int GL.GL_COLOR_ARRAY_BUFFER_BINDING
Used in glColorPointer and glGet
constant int GL.GL_COLOR_ARRAY_POINTER
Used in glColorPointer
constant int GL.GL_COLOR_ARRAY_SIZE
Used in glColorPointer and glGet
constant int GL.GL_COLOR_ARRAY_STRIDE
Used in glColorPointer and glGet
constant int GL.GL_COLOR_ARRAY_TYPE
Used in glColorPointer and glGet
constant int GL.GL_COLOR_BUFFER_BIT
Used in glClear and glPushAttrib
constant int GL.GL_COLOR_CLEAR_VALUE
Used in glClear, glClearColor and glGet
constant int GL.GL_COLOR_INDEX
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_COLOR_INDEXES
Used in glLightModel and glMaterial
constant int GL.GL_COLOR_LOGIC_OP
Used in glEnable, glGet, glIsEnabled, glLogicOp and
glPushAttrib
constant int GL.GL_COLOR_MATERIAL
Used in glColorMaterial, glEnable, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_COLOR_MATERIAL_FACE
Used in glColorMaterial, glGet and glPushAttrib
constant int GL.GL_COLOR_MATERIAL_PARAMETER
Used in glColorMaterial and glGet
constant int GL.GL_COLOR_MATRIX
Used in glFrustum, glGet, glLoadIdentity, glLoadMatrix,
glMultMatrix, glOrtho, glPushMatrix, glRotate, glScale
and glTranslate
constant int GL.GL_COLOR_MATRIX_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_COLOR_SUM
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_COLOR_TABLE
Used in glEnable, glGet, glIsEnabled, glTexImage1D and
glTexImage2D
constant int GL.GL_COLOR_TABLE_ALPHA_SIZE
constant int GL.GL_COLOR_TABLE_ALPHA_SIZE_SGI
constant int GL.GL_COLOR_TABLE_BIAS
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_COLOR_TABLE_BIAS_SGI
constant int GL.GL_COLOR_TABLE_BLUE_SIZE
constant int GL.GL_COLOR_TABLE_BLUE_SIZE_SGI
constant int GL.GL_COLOR_TABLE_FORMAT
constant int GL.GL_COLOR_TABLE_FORMAT_SGI
constant int GL.GL_COLOR_TABLE_GREEN_SIZE
constant int GL.GL_COLOR_TABLE_GREEN_SIZE_SGI
constant int GL.GL_COLOR_TABLE_INTENSITY_SIZE
constant int GL.GL_COLOR_TABLE_INTENSITY_SIZE_SGI
constant int GL.GL_COLOR_TABLE_LUMINANCE_SIZE
constant int GL.GL_COLOR_TABLE_LUMINANCE_SIZE_SGI
constant int GL.GL_COLOR_TABLE_RED_SIZE
constant int GL.GL_COLOR_TABLE_RED_SIZE_SGI
constant int GL.GL_COLOR_TABLE_SCALE
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_COLOR_TABLE_SCALE_SGI
constant int GL.GL_COLOR_TABLE_WIDTH
constant int GL.GL_COLOR_TABLE_WIDTH_SGI
constant int GL.GL_COLOR_WRITEMASK
Used in glColorMask and glGet
constant int GL.GL_COMBINE
Used in glTexEnv
constant int GL.GL_COMBINE_ALPHA
Used in glTexEnv
constant int GL.GL_COMBINE_RGB
Used in glTexEnv
constant int GL.GL_COMPARE_R_TO_TEXTURE
Used in glTexParameter
constant int GL.GL_COMPILE
Used in glNewList
constant int GL.GL_COMPILE_AND_EXECUTE
Used in glNewList
constant int GL.GL_COMPRESSED_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_GEOM_ACCELERATED_SUNX
constant int GL.GL_COMPRESSED_GEOM_VERSION_SUNX
constant int GL.GL_COMPRESSED_INTENSITY
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_LUMINANCE
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_LUMINANCE_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_RGB
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_RGBA
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_COMPRESSED_TEXTURE_FORMATS
Used in glGet
constant int GL.GL_CONSTANT
Used in glTexEnv
constant int GL.GL_CONSTANT_ALPHA
Used in glBlendFunc
constant int GL.GL_CONSTANT_ALPHA_EXT
constant int GL.GL_CONSTANT_ATTENUATION
Used in glLight
constant int GL.GL_CONSTANT_BORDER
constant int GL.GL_CONSTANT_BORDER_HP
constant int GL.GL_CONSTANT_COLOR
Used in glBlendFunc
constant int GL.GL_CONSTANT_COLOR_EXT
constant int GL.GL_CONVOLUTION_1D
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_CONVOLUTION_1D_EXT
constant int GL.GL_CONVOLUTION_2D
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_CONVOLUTION_2D_EXT
constant int GL.GL_CONVOLUTION_BORDER_COLOR
constant int GL.GL_CONVOLUTION_BORDER_COLOR_HP
constant int GL.GL_CONVOLUTION_BORDER_MODE
Used in glTexImage1D and glTexImage2D
constant int GL.GL_CONVOLUTION_BORDER_MODE_EXT
constant int GL.GL_CONVOLUTION_FILTER_BIAS
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_CONVOLUTION_FILTER_BIAS_EXT
constant int GL.GL_CONVOLUTION_FILTER_SCALE
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_CONVOLUTION_FILTER_SCALE_EXT
constant int GL.GL_CONVOLUTION_FORMAT
constant int GL.GL_CONVOLUTION_FORMAT_EXT
constant int GL.GL_CONVOLUTION_HEIGHT
constant int GL.GL_CONVOLUTION_HEIGHT_EXT
constant int GL.GL_CONVOLUTION_WIDTH
constant int GL.GL_CONVOLUTION_WIDTH_EXT
constant int GL.GL_COORD_REPLACE
Used in glTexEnv
constant int GL.GL_COPY
Used in glGet and glLogicOp
constant int GL.GL_COPY_INVERTED
Used in glLogicOp
constant int GL.GL_COPY_PIXEL_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_CUBIC_EXT
constant int GL.GL_CULL_FACE
Used in glCullFace, glEnable, glFrontFace, glGet,
glIsEnabled and glPushAttrib
constant int GL.GL_CULL_FACE_MODE
Used in glCullFace, glGet and glPushAttrib
constant int GL.GL_CURRENT_BIT
Used in glPushAttrib
constant int GL.GL_CURRENT_COLOR
Used in glColor, glGet and glRasterPos
constant int GL.GL_CURRENT_FOG_COORD
Used in glGet
constant int GL.GL_CURRENT_INDEX
Used in glGet, glIndex and glRasterPos
constant int GL.GL_CURRENT_NORMAL
Used in glGet and glNormal
constant int GL.GL_CURRENT_PROGRAM
Used in glGet
constant int GL.GL_CURRENT_RASTER_COLOR
Used in glGet and glRasterPos
constant int GL.GL_CURRENT_RASTER_DISTANCE
Used in glGet and glRasterPos
constant int GL.GL_CURRENT_RASTER_INDEX
Used in glGet and glRasterPos
constant int GL.GL_CURRENT_RASTER_POSITION
Used in glCopyPixels, glDrawPixels, glGet and glRasterPos
constant int GL.GL_CURRENT_RASTER_POSITION_VALID
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib
and glRasterPos
constant int GL.GL_CURRENT_RASTER_SECONDARY_COLOR
Used in glGet and glRasterPos
constant int GL.GL_CURRENT_RASTER_TEXTURE_COORDS
Used in glGet and glRasterPos
constant int GL.GL_CURRENT_SECONDARY_COLOR
Used in glGet
constant int GL.GL_CURRENT_TEXTURE_COORDS
Used in glGet, glRasterPos and glTexCoord
constant int GL.GL_CW
Used in glFrontFace
constant int GL.GL_DECAL
Used in glTexEnv
constant int GL.GL_DECR
Used in glStencilOp
constant int GL.GL_DECR_WRAP
Used in glStencilOp
constant int GL.GL_DEPTH
Used in glCopyPixels
constant int GL.GL_DEPTH_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_DEPTH_BITS
Used in glGet
constant int GL.GL_DEPTH_BUFFER_BIT
Used in glClear and glPushAttrib
constant int GL.GL_DEPTH_CLEAR_VALUE
Used in glClear, glClearDepth and glGet
constant int GL.GL_DEPTH_COMPONENT
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_DEPTH_COMPONENT16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_DEPTH_COMPONENT24
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_DEPTH_COMPONENT32
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_DEPTH_FUNC
Used in glDepthFunc and glGet
constant int GL.GL_DEPTH_RANGE
Used in glDepthRange and glGet
constant int GL.GL_DEPTH_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_DEPTH_TEST
Used in glDepthFunc, glEnable, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_DEPTH_TEXTURE_MODE
Used in glTexParameter
constant int GL.GL_DEPTH_WRITEMASK
Used in glDepthMask, glGet and glPushAttrib
constant int GL.GL_DIFFUSE
Used in glColorMaterial, glLight and glMaterial
constant int GL.GL_DITHER
Used in glEnable, glGet, glIsEnabled and glPushAttrib
constant int GL.GL_DOMAIN
constant int GL.GL_DONT_CARE
Used in glGet and glHint
constant int GL.GL_DOT3_RGB
Used in glTexEnv
constant int GL.GL_DOT3_RGBA
Used in glTexEnv
constant int GL.GL_DOUBLE
Used in glColorPointer, glIndexPointer, glNormalPointer,
glTexCoordPointer and glVertexPointer
constant int GL.GL_DOUBLEBUFFER
Used in glGet
constant int GL.GL_DRAW_BUFFER
Used in glDrawBuffer, glGet and glPushAttrib
constant int GL.GL_DRAW_BUFFER0
Used in glGet
constant int GL.GL_DRAW_PIXEL_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_DST_ALPHA
Used in glBlendFunc
constant int GL.GL_DST_COLOR
Used in glBlendFunc
constant int GL.GL_EDGE_FLAG
Used in glEdgeFlag, glGet and glPushAttrib
constant int GL.GL_EDGE_FLAG_ARRAY
Used in glEdgeFlagPointer, glEnableClientState, glGet and
glIsEnabled
constant int GL.GL_EDGE_FLAG_ARRAY_BUFFER_BINDING
Used in glEdgeFlagPointer and glGet
constant int GL.GL_EDGE_FLAG_ARRAY_POINTER
Used in glEdgeFlagPointer
constant int GL.GL_EDGE_FLAG_ARRAY_STRIDE
Used in glEdgeFlagPointer and glGet
constant int GL.GL_ELEMENT_ARRAY_BUFFER
Used in glGet
constant int GL.GL_ELEMENT_ARRAY_BUFFER_BINDING
Used in glGet
constant int GL.GL_EMISSION
Used in glColorMaterial and glMaterial
constant int GL.GL_ENABLE_BIT
Used in glPushAttrib
constant int GL.GL_EQUAL
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_EQUIV
Used in glLogicOp
constant int GL.GL_EVAL_BIT
Used in glPushAttrib
constant int GL.GL_EXP
Used in glFog and glGet
constant int GL.GL_EXP2
Used in glFog
constant int GL.GL_EXTENSIONS
Used in glEnable, glGet, glGetString and glIsEnabled
constant int GL.GL_EXT_abgr
constant int GL.GL_EXT_blend_color
constant int GL.GL_EXT_blend_minmax
constant int GL.GL_EXT_blend_subtract
constant int GL.GL_EXT_convolution
constant int GL.GL_EXT_histogram
constant int GL.GL_EXT_pixel_transform
constant int GL.GL_EXT_rescale_normal
constant int GL.GL_EXT_texture3D
constant int GL.GL_EYE_LINEAR
Used in glTexGen
constant int GL.GL_EYE_PLANE
Used in glTexGen
constant int GL.GL_FALSE
Used in glColorMask, glDepthMask, glEdgeFlag, glEnable,
glGet, glIsEnabled, glIsList, glIsTexture, glTexEnv and
glTexParameter
constant int GL.GL_FASTEST
Used in glHint
constant int GL.GL_FEEDBACK
Used in glFeedbackBuffer, glPassThrough and glRenderMode
constant int GL.GL_FEEDBACK_BUFFER_POINTER
Used in glFeedbackBuffer
constant int GL.GL_FEEDBACK_BUFFER_SIZE
Used in glFeedbackBuffer and glGet
constant int GL.GL_FEEDBACK_BUFFER_TYPE
Used in glFeedbackBuffer and glGet
constant int GL.GL_FILL
Used in glEnable, glEvalMesh2, glGet and glPolygonMode
constant int GL.GL_FLAT
Used in glShadeModel
constant int GL.GL_FLOAT
Used in glColorPointer, glDrawPixels, glGet,
glGetTexImage, glIndexPointer, glNormalPointer,
glReadPixels, glTexCoordPointer, glTexImage1D,
glTexImage2D, glTexSubImage1D, glTexSubImage2D and
glVertexPointer
constant int GL.GL_FOG
Used in glEnable, glFog, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_FOG_BIT
Used in glPushAttrib
constant int GL.GL_FOG_COLOR
Used in glFog and glGet
constant int GL.GL_FOG_COORD
Used in glFog
constant int GL.GL_FOG_COORD_ARRAY
Used in glEnableClientState, glGet and glIsEnabled
constant int GL.GL_FOG_COORD_ARRAY_BUFFER_BINDING
Used in glGet
constant int GL.GL_FOG_COORD_ARRAY_STRIDE
Used in glGet
constant int GL.GL_FOG_COORD_ARRAY_TYPE
Used in glGet
constant int GL.GL_FOG_COORD_SRC
Used in glFog and glGet
constant int GL.GL_FOG_DENSITY
Used in glFog and glGet
constant int GL.GL_FOG_END
Used in glFog and glGet
constant int GL.GL_FOG_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_FOG_INDEX
Used in glFog and glGet
constant int GL.GL_FOG_MODE
Used in glFog, glGet and glPushAttrib
constant int GL.GL_FOG_START
Used in glFog and glGet
constant int GL.GL_FRAGMENT_DEPTH
Used in glFog and glGet
constant int GL.GL_FRAGMENT_SHADER_DERIVATIVE_HINT
Used in glGet and glHint
constant int GL.GL_FRONT
Used in glColorMaterial, glCullFace, glDrawBuffer, glGet,
glMaterial, glPolygonMode and glReadBuffer
constant int GL.GL_FRONT_AND_BACK
Used in glColorMaterial, glCullFace, glDrawBuffer, glGet,
glMaterial, glPolygonMode, glStencilFunc, glStencilMask
and glStencilOp
constant int GL.GL_FRONT_FACE
Used in glFrontFace, glGet and glPushAttrib
constant int GL.GL_FRONT_LEFT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_FRONT_RIGHT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_FUNC_ADD
Used in glGet
constant int GL.GL_FUNC_ADD_EXT
constant int GL.GL_FUNC_REVERSE_SUBTRACT
Used in glGet
constant int GL.GL_FUNC_REVERSE_SUBTRACT_EXT
constant int GL.GL_FUNC_SUBTRACT
Used in glGet
constant int GL.GL_FUNC_SUBTRACT_EXT
constant int GL.GL_GENERATE_MIPMAP
Used in glTexParameter
constant int GL.GL_GENERATE_MIPMAP_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_GEQUAL
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_GREATER
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_GREEN
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_GREEN_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_GREEN_BITS
Used in glGet
constant int GL.GL_GREEN_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_HINT_BIT
Used in glPushAttrib
constant int GL.GL_HISTOGRAM
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_HISTOGRAM_ALPHA_SIZE
constant int GL.GL_HISTOGRAM_ALPHA_SIZE_EXT
constant int GL.GL_HISTOGRAM_BLUE_SIZE
constant int GL.GL_HISTOGRAM_BLUE_SIZE_EXT
constant int GL.GL_HISTOGRAM_EXT
constant int GL.GL_HISTOGRAM_FORMAT
constant int GL.GL_HISTOGRAM_FORMAT_EXT
constant int GL.GL_HISTOGRAM_GREEN_SIZE
constant int GL.GL_HISTOGRAM_GREEN_SIZE_EXT
constant int GL.GL_HISTOGRAM_LUMINANCE_SIZE
constant int GL.GL_HISTOGRAM_LUMINANCE_SIZE_EXT
constant int GL.GL_HISTOGRAM_RED_SIZE
constant int GL.GL_HISTOGRAM_RED_SIZE_EXT
constant int GL.GL_HISTOGRAM_SINK
constant int GL.GL_HISTOGRAM_SINK_EXT
constant int GL.GL_HISTOGRAM_WIDTH
constant int GL.GL_HISTOGRAM_WIDTH_EXT
constant int GL.GL_HP_convolution_border_modes
constant int GL.GL_HP_occlusion_test
constant int GL.GL_IGNORE_BORDER_HP
constant int GL.GL_INCR
Used in glStencilOp
constant int GL.GL_INCR_WRAP
Used in glStencilOp
constant int GL.GL_INDEX_ARRAY
Used in glEnableClientState, glGet, glIndexPointer and
glIsEnabled
constant int GL.GL_INDEX_ARRAY_BUFFER_BINDING
Used in glGet and glIndexPointer
constant int GL.GL_INDEX_ARRAY_POINTER
Used in glIndexPointer
constant int GL.GL_INDEX_ARRAY_STRIDE
Used in glGet and glIndexPointer
constant int GL.GL_INDEX_ARRAY_TYPE
Used in glGet and glIndexPointer
constant int GL.GL_INDEX_BITS
Used in glClearIndex and glGet
constant int GL.GL_INDEX_CLEAR_VALUE
Used in glClear, glClearIndex and glGet
constant int GL.GL_INDEX_LOGIC_OP
Used in glEnable, glGet, glIsEnabled, glLogicOp and
glPushAttrib
constant int GL.GL_INDEX_MODE
Used in glGet and glReadPixels
constant int GL.GL_INDEX_OFFSET
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_INDEX_SHIFT
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_INDEX_WRITEMASK
Used in glGet and glIndexMask
constant int GL.GL_INT
Used in glColorPointer, glDrawPixels, glGetTexImage,
glIndexPointer, glNormalPointer, glReadPixels,
glTexCoordPointer, glTexImage1D, glTexImage2D,
glTexSubImage1D, glTexSubImage2D and glVertexPointer
constant int GL.GL_INTENSITY
Used in glCopyTexImage1D, glCopyTexImage2D, glTexEnv,
glTexImage1D, glTexImage2D and glTexParameter
constant int GL.GL_INTENSITY12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_INTENSITY16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_INTENSITY4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_INTENSITY8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_INTERPOLATE
Used in glTexEnv
constant int GL.GL_INVALID_ENUM
Used in glAccum, glAlphaFunc, glBegin, glBindTexture,
glBlendFunc, glClipPlane, glColorMaterial, glColorPointer,
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D, glCullFace,
glDepthFunc, glDrawArrays, glDrawBuffer, glDrawElements,
glDrawPixels, glEdgeFlagPointer, glEnable,
glEnableClientState, glEvalMesh2, glFeedbackBuffer, glFog,
glFrontFace, glGet, glGetError, glGetString,
glGetTexImage, glHint, glIndexPointer,
glInterleavedArrays, glIsEnabled, glLight, glLightModel,
glLogicOp, glMaterial, glMatrixMode, glNewList,
glNormalPointer, glPolygonMode, glReadBuffer,
glReadPixels, glRenderMode, glShadeModel, glStencilFunc,
glStencilOp, glTexCoordPointer, glTexEnv, glTexGen,
glTexImage1D, glTexImage2D, glTexParameter,
glTexSubImage1D, glTexSubImage2D and glVertexPointer
constant int GL.GL_INVALID_OPERATION
Used in glAccum, glAlphaFunc, glArrayElement, glBegin,
glBindTexture, glBlendFunc, glClear, glClearAccum,
glClearColor, glClearDepth, glClearIndex, glClearStencil,
glClipPlane, glColorMask, glColorMaterial, glCopyPixels,
glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D,
glCopyTexSubImage2D, glCullFace, glDeleteLists,
glDeleteTextures, glDepthFunc, glDepthMask, glDepthRange,
glDrawArrays, glDrawBuffer, glDrawElements, glDrawPixels,
glEnable, glEvalMesh2, glFeedbackBuffer, glFinish,
glFlush, glFog, glFrontFace, glFrustum, glGenLists,
glGenTextures, glGet, glGetError, glGetString,
glGetTexImage, glHint, glIndexMask, glInitNames,
glIsEnabled, glIsList, glIsTexture, glLight,
glLightModel, glLineStipple, glLineWidth, glListBase,
glLoadIdentity, glLoadMatrix, glLoadName, glLogicOp,
glMapGrid, glMatrixMode, glMultMatrix, glNewList,
glOrtho, glPassThrough, glPixelZoom, glPointSize,
glPolygonMode, glPolygonOffset, glPushAttrib,
glPushMatrix, glPushName, glRasterPos, glReadBuffer,
glReadPixels, glRenderMode, glRotate, glScale,
glScissor, glSelectBuffer, glShadeModel, glStencilFunc,
glStencilMask, glStencilOp, glTexEnv, glTexGen,
glTexImage1D, glTexImage2D, glTexParameter,
glTexSubImage1D, glTexSubImage2D, glTranslate and
glViewport
constant int GL.GL_INVALID_VALUE
Used in glArrayElement, glClear, glColorPointer,
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D, glDeleteLists,
glDrawArrays, glDrawPixels, glFeedbackBuffer, glFog,
glFrustum, glGenLists, glGenTextures, glGetError,
glGetTexImage, glIndexPointer, glInterleavedArrays,
glLight, glLineWidth, glMapGrid, glMaterial, glNewList,
glNormalPointer, glOrtho, glPointSize, glReadPixels,
glScissor, glSelectBuffer, glTexCoordPointer, glTexEnv,
glTexImage1D, glTexImage2D, glTexSubImage1D,
glTexSubImage2D, glVertexPointer and glViewport
constant int GL.GL_INVERT
Used in glLogicOp and glStencilOp
constant int GL.GL_KEEP
Used in glGet and glStencilOp
constant int GL.GL_LARGE_SUNX
constant int GL.GL_LEFT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_LEQUAL
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_LESS
Used in glAlphaFunc, glDepthFunc, glGet, glStencilFunc and
glTexParameter
constant int GL.GL_LIGHT0
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT1
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT2
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT3
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT4
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT5
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT6
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT7
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHTING
Used in glEnable, glGet, glIsEnabled, glLight,
glLightModel and glPushAttrib
constant int GL.GL_LIGHTING_BIT
Used in glEnable, glGet, glIsEnabled, glLight and
glPushAttrib
constant int GL.GL_LIGHT_MODEL_AMBIENT
Used in glEnable, glGet, glIsEnabled, glLight,
glLightModel and glPushAttrib
constant int GL.GL_LIGHT_MODEL_COLOR_CONTROL
Used in glEnable, glGet, glIsEnabled, glLight,
glLightModel and glPushAttrib
constant int GL.GL_LIGHT_MODEL_LOCAL_VIEWER
Used in glEnable, glGet, glIsEnabled, glLight,
glLightModel and glPushAttrib
constant int GL.GL_LIGHT_MODEL_TWO_SIDE
Used in glEnable, glGet, glIsEnabled, glLight,
glLightModel and glPushAttrib
constant int GL.GL_LINE
Used in glEdgeFlag, glEnable, glEvalMesh2 and
glPolygonMode
constant int GL.GL_LINEAR
Used in glFog and glTexParameter
constant int GL.GL_LINEAR_ATTENUATION
Used in glLight
constant int GL.GL_LINEAR_MIPMAP_LINEAR
Used in glTexParameter
constant int GL.GL_LINEAR_MIPMAP_NEAREST
Used in glTexParameter
constant int GL.GL_LINES
Used in glBegin, glDrawArrays, glDrawElements, glEvalMesh2
and glLineStipple
constant int GL.GL_LINE_BIT
Used in glPushAttrib
constant int GL.GL_LINE_LOOP
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_LINE_RESET_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_LINE_SMOOTH
Used in glEnable, glGet, glIsEnabled, glLineWidth,
glPolygonMode and glPushAttrib
constant int GL.GL_LINE_SMOOTH_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_LINE_STIPPLE
Used in glEnable, glGet, glIsEnabled, glLineStipple and
glPushAttrib
constant int GL.GL_LINE_STIPPLE_PATTERN
Used in glGet and glLineStipple
constant int GL.GL_LINE_STIPPLE_REPEAT
Used in glGet and glLineStipple
constant int GL.GL_LINE_STRIP
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_LINE_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_LINE_WIDTH
Used in glGet, glLineWidth and glPolygonMode
constant int GL.GL_LINE_WIDTH_GRANULARITY
Used in glGet and glLineWidth
constant int GL.GL_LINE_WIDTH_RANGE
Used in glGet and glLineWidth
constant int GL.GL_LIST_BASE
Used in glCallLists, glGet, glListBase and glPushAttrib
constant int GL.GL_LIST_BIT
Used in glPushAttrib
constant int GL.GL_LIST_INDEX
Used in glGet and glNewList
constant int GL.GL_LIST_MODE
Used in glGet and glNewList
constant int GL.GL_LOAD
Used in glAccum
constant int GL.GL_LOGIC_OP
constant int GL.GL_LOGIC_OP_MODE
Used in glGet and glLogicOp
constant int GL.GL_LUMINANCE
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexEnv, glTexImage1D,
glTexImage2D, glTexParameter, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_LUMINANCE12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE12_ALPHA12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE12_ALPHA4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE16_ALPHA16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE4_ALPHA4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE6_ALPHA2
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE8_ALPHA8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_LUMINANCE_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexEnv, glTexImage1D,
glTexImage2D, glTexSubImage1D and glTexSubImage2D
constant int GL.GL_MAP1_COLOR_4
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_GRID_DOMAIN
Used in glEvalMesh2, glEvalPoint, glGet, glMapGrid and
glPushAttrib
constant int GL.GL_MAP1_GRID_SEGMENTS
Used in glEvalMesh2, glEvalPoint, glGet, glMapGrid and
glPushAttrib
constant int GL.GL_MAP1_INDEX
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_NORMAL
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_TEXTURE_COORD_1
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_TEXTURE_COORD_2
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_TEXTURE_COORD_3
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_TEXTURE_COORD_4
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP1_VERTEX_3
Used in glEnable, glEvalCoord, glGet and glPushAttrib
constant int GL.GL_MAP1_VERTEX_4
Used in glEnable, glEvalCoord, glGet and glPushAttrib
constant int GL.GL_MAP2_COLOR_4
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_GRID_DOMAIN
Used in glEvalMesh2, glEvalPoint, glGet, glMapGrid and
glPushAttrib
constant int GL.GL_MAP2_GRID_SEGMENTS
Used in glEvalMesh2, glEvalPoint, glGet, glMapGrid and
glPushAttrib
constant int GL.GL_MAP2_INDEX
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_NORMAL
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_TEXTURE_COORD_1
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_TEXTURE_COORD_2
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_TEXTURE_COORD_3
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_TEXTURE_COORD_4
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_VERTEX_3
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP2_VERTEX_4
Used in glEnable, glEvalCoord, glGet, glIsEnabled and
glPushAttrib
constant int GL.GL_MAP_COLOR
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib
and glReadPixels
constant int GL.GL_MAP_STENCIL
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib
and glReadPixels
constant int GL.GL_MATRIX_MODE
Used in glFrustum, glGet, glLoadIdentity, glLoadMatrix,
glMatrixMode, glMultMatrix, glOrtho, glPushAttrib,
glPushMatrix, glRotate, glScale and glTranslate
constant int GL.GL_MAX
Used in glGet
constant int GL.GL_MAX_3D_TEXTURE_SIZE
Used in glGet
constant int GL.GL_MAX_3D_TEXTURE_SIZE_EXT
constant int GL.GL_MAX_ATTRIB_STACK_DEPTH
Used in glGet and glPushAttrib
constant int GL.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
Used in glGet and glPushClientAttrib
constant int GL.GL_MAX_CLIP_PLANES
Used in glClipPlane and glGet
constant int GL.GL_MAX_COLOR_MATRIX_STACK_DEPTH
Used in glGet
constant int GL.GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
Used in glGet
constant int GL.GL_MAX_CONVOLUTION_HEIGHT
constant int GL.GL_MAX_CONVOLUTION_HEIGHT_EXT
constant int GL.GL_MAX_CONVOLUTION_WIDTH
constant int GL.GL_MAX_CONVOLUTION_WIDTH_EXT
constant int GL.GL_MAX_CUBE_MAP_TEXTURE_SIZE
Used in glGet
constant int GL.GL_MAX_DRAW_BUFFERS
Used in glGet
constant int GL.GL_MAX_ELEMENTS_INDICES
Used in glGet
constant int GL.GL_MAX_ELEMENTS_VERTICES
Used in glGet
constant int GL.GL_MAX_EVAL_ORDER
Used in glGet
constant int GL.GL_MAX_EXT
constant int GL.GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
Used in glGet
constant int GL.GL_MAX_LIGHTS
Used in glGet, glLight and glPushAttrib
constant int GL.GL_MAX_LIST_NESTING
Used in glCallList, glCallLists and glGet
constant int GL.GL_MAX_MODELVIEW_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_MAX_NAME_STACK_DEPTH
Used in glGet, glInitNames, glLoadName and glPushName
constant int GL.GL_MAX_PIXEL_MAP_TABLE
Used in glGet
constant int GL.GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT
constant int GL.GL_MAX_PROJECTION_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_MAX_TEXTURE_COORDS
Used in glGet
constant int GL.GL_MAX_TEXTURE_IMAGE_UNITS
Used in glGet
constant int GL.GL_MAX_TEXTURE_LOD_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_MAX_TEXTURE_SIZE
Used in glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D, glGet,
glGetTexImage, glTexImage1D, glTexImage2D, glTexSubImage1D
and glTexSubImage2D
constant int GL.GL_MAX_TEXTURE_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_MAX_TEXTURE_UNITS
Used in glGet
constant int GL.GL_MAX_TEXTURE_UNITS_ARB
constant int GL.GL_MAX_VARYING_FLOATS
Used in glGet
constant int GL.GL_MAX_VERTEX_ATTRIBS
Used in glGet
constant int GL.GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
Used in glGet
constant int GL.GL_MAX_VERTEX_UNIFORM_COMPONENTS
Used in glGet
constant int GL.GL_MAX_VIEWPORT_DIMS
Used in glGet and glViewport
constant int GL.GL_MIN
Used in glGet
constant int GL.GL_MINMAX
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_MINMAX_EXT
constant int GL.GL_MINMAX_FORMAT
constant int GL.GL_MINMAX_FORMAT_EXT
constant int GL.GL_MINMAX_SINK
constant int GL.GL_MINMAX_SINK_EXT
constant int GL.GL_MIN_EXT
constant int GL.GL_MIRRORED_REPEAT
Used in glTexParameter
constant int GL.GL_MODELVIEW
Used in glGet, glMatrixMode, glPushMatrix, glRotate,
glScale and glTranslate
constant int GL.GL_MODELVIEW_MATRIX
Used in glFrustum, glGet, glLoadIdentity, glLoadMatrix,
glMultMatrix, glOrtho, glPushMatrix, glRotate, glScale
and glTranslate
constant int GL.GL_MODELVIEW_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_MODULATE
Used in glTexEnv
constant int GL.GL_MULT
Used in glAccum
constant int GL.GL_MULTISAMPLE
Used in glEnable, glIsEnabled and glPushAttrib
constant int GL.GL_MULTISAMPLE_BIT
Used in glPushAttrib
constant int GL.GL_N3F_V3F
Used in glInterleavedArrays
constant int GL.GL_NAME_STACK_DEPTH
Used in glGet, glInitNames, glLoadName, glPushName and
glSelectBuffer
constant int GL.GL_NAND
Used in glLogicOp
constant int GL.GL_NEAREST
Used in glTexParameter
constant int GL.GL_NEAREST_MIPMAP_LINEAR
Used in glTexParameter
constant int GL.GL_NEAREST_MIPMAP_NEAREST
Used in glTexParameter
constant int GL.GL_NEVER
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_NICEST
Used in glHint
constant int GL.GL_NONE
Used in glDrawBuffer, glGet and glTexParameter
constant int GL.GL_NOOP
Used in glLogicOp
constant int GL.GL_NOR
Used in glLogicOp
constant int GL.GL_NORMALIZE
Used in glEnable, glGet, glIsEnabled, glNormal,
glPushAttrib and glScale
constant int GL.GL_NORMAL_ARRAY
Used in glEnableClientState, glGet, glIsEnabled and
glNormalPointer
constant int GL.GL_NORMAL_ARRAY_BUFFER_BINDING
Used in glGet and glNormalPointer
constant int GL.GL_NORMAL_ARRAY_POINTER
Used in glNormalPointer
constant int GL.GL_NORMAL_ARRAY_STRIDE
Used in glGet and glNormalPointer
constant int GL.GL_NORMAL_ARRAY_TYPE
Used in glGet and glNormalPointer
constant int GL.GL_NORMAL_MAP
Used in glTexGen
constant int GL.GL_NOTEQUAL
Used in glAlphaFunc, glDepthFunc, glStencilFunc and
glTexParameter
constant int GL.GL_NO_ERROR
Used in glGetError
constant int GL.GL_NUM_COMPRESSED_TEXTURE_FORMATS
Used in glGet
constant int GL.GL_OBJECT_LINEAR
Used in glTexGen
constant int GL.GL_OBJECT_PLANE
Used in glTexGen
constant int GL.GL_OCCLUSION_RESULT_HP
constant int GL.GL_OCCLUSION_TEST_HP
constant int GL.GL_ONE
Used in glBlendFunc and glGet
constant int GL.GL_ONE_MINUS_CONSTANT_ALPHA
Used in glBlendFunc
constant int GL.GL_ONE_MINUS_CONSTANT_ALPHA_EXT
constant int GL.GL_ONE_MINUS_CONSTANT_COLOR
Used in glBlendFunc
constant int GL.GL_ONE_MINUS_CONSTANT_COLOR_EXT
constant int GL.GL_ONE_MINUS_DST_ALPHA
Used in glBlendFunc
constant int GL.GL_ONE_MINUS_DST_COLOR
Used in glBlendFunc
constant int GL.GL_ONE_MINUS_SRC_ALPHA
Used in glBlendFunc and glTexEnv
constant int GL.GL_ONE_MINUS_SRC_COLOR
Used in glBlendFunc and glTexEnv
constant int GL.GL_OPERAND0_ALPHA
Used in glTexEnv
constant int GL.GL_OPERAND0_RGB
Used in glTexEnv
constant int GL.GL_OPERAND1_ALPHA
Used in glTexEnv
constant int GL.GL_OPERAND1_RGB
Used in glTexEnv
constant int GL.GL_OPERAND2_ALPHA
Used in glTexEnv
constant int GL.GL_OPERAND2_RGB
Used in glTexEnv
constant int GL.GL_OR
Used in glLogicOp
constant int GL.GL_ORDER
constant int GL.GL_OR_INVERTED
Used in glLogicOp
constant int GL.GL_OR_REVERSE
Used in glLogicOp
constant int GL.GL_OUT_OF_MEMORY
Used in glGetError and glNewList
constant int GL.GL_PACK_ALIGNMENT
Used in glGet and glGetTexImage
constant int GL.GL_PACK_IMAGE_HEIGHT
Used in glGet
constant int GL.GL_PACK_IMAGE_HEIGHT_EXT
constant int GL.GL_PACK_LSB_FIRST
Used in glGet and glReadPixels
constant int GL.GL_PACK_ROW_LENGTH
Used in glGet
constant int GL.GL_PACK_SKIP_IMAGES
Used in glGet
constant int GL.GL_PACK_SKIP_IMAGES_EXT
constant int GL.GL_PACK_SKIP_PIXELS
Used in glGet
constant int GL.GL_PACK_SKIP_ROWS
Used in glGet
constant int GL.GL_PACK_SWAP_BYTES
Used in glGet and glReadPixels
constant int GL.GL_PASS_THROUGH_TOKEN
Used in glFeedbackBuffer and glPassThrough
constant int GL.GL_PERSPECTIVE_CORRECTION_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_PIXEL_CUBIC_WEIGHT_EXT
constant int GL.GL_PIXEL_MAG_FILTER_EXT
constant int GL.GL_PIXEL_MAP_A_TO_A
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_A_TO_A_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_B_TO_B
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_B_TO_B_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_G_TO_G
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_G_TO_G_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_A
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_PIXEL_MAP_I_TO_A_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_B
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_PIXEL_MAP_I_TO_B_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_G
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_PIXEL_MAP_I_TO_G_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_I
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_I_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_I_TO_R
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_PIXEL_MAP_I_TO_R_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_R_TO_R
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_R_TO_R_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MAP_S_TO_S
Used in glCopyPixels, glDrawPixels and glReadPixels
constant int GL.GL_PIXEL_MAP_S_TO_S_SIZE
Used in glCopyPixels, glDrawPixels, glGet and glReadPixels
constant int GL.GL_PIXEL_MIN_FILTER_EXT
constant int GL.GL_PIXEL_MODE_BIT
Used in glPushAttrib
constant int GL.GL_PIXEL_PACK_BUFFER
Used in glGet, glGetTexImage and glReadPixels
constant int GL.GL_PIXEL_PACK_BUFFER_BINDING
Used in glGet, glGetTexImage and glReadPixels
constant int GL.GL_PIXEL_TRANSFORM_2D_EXT
constant int GL.GL_PIXEL_TRANSFORM_2D_MATRIX_EXT
constant int GL.GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT
constant int GL.GL_PIXEL_TRANSFORM_COLOR_TABLE_EXT
constant int GL.GL_PIXEL_UNPACK_BUFFER
Used in glDrawPixels, glGet, glTexImage1D, glTexImage2D,
glTexSubImage1D and glTexSubImage2D
constant int GL.GL_PIXEL_UNPACK_BUFFER_BINDING
Used in glDrawPixels, glGet, glTexImage1D, glTexImage2D,
glTexSubImage1D and glTexSubImage2D
constant int GL.GL_POINT
Used in glEdgeFlag, glEnable, glEvalMesh2 and
glPolygonMode
constant int GL.GL_POINTS
Used in glBegin, glDrawArrays, glDrawElements and
glEvalMesh2
constant int GL.GL_POINT_BIT
Used in glPushAttrib
constant int GL.GL_POINT_DISTANCE_ATTENUATION
Used in glGet and glPointSize
constant int GL.GL_POINT_FADE_THRESHOLD_SIZE
Used in glGet and glPointSize
constant int GL.GL_POINT_SIZE
Used in glGet, glPointSize and glPolygonMode
constant int GL.GL_POINT_SIZE_GRANULARITY
Used in glGet and glPointSize
constant int GL.GL_POINT_SIZE_MAX
Used in glGet and glPointSize
constant int GL.GL_POINT_SIZE_MIN
Used in glGet and glPointSize
constant int GL.GL_POINT_SIZE_RANGE
Used in glGet and glPointSize
constant int GL.GL_POINT_SMOOTH
Used in glEnable, glGet, glIsEnabled, glPointSize,
glPolygonMode and glPushAttrib
constant int GL.GL_POINT_SMOOTH_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_POINT_SPRITE
Used in glEnable, glGet, glIsEnabled and glTexEnv
constant int GL.GL_POINT_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_POLYGON
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_POLYGON_BIT
Used in glPushAttrib
constant int GL.GL_POLYGON_MODE
Used in glEdgeFlag, glGet, glPolygonMode and glPushAttrib
constant int GL.GL_POLYGON_OFFSET_FACTOR
Used in glGet, glPolygonOffset and glPushAttrib
constant int GL.GL_POLYGON_OFFSET_FILL
Used in glEnable, glGet, glIsEnabled, glPolygonOffset and
glPushAttrib
constant int GL.GL_POLYGON_OFFSET_LINE
Used in glEnable, glGet, glIsEnabled, glPolygonOffset and
glPushAttrib
constant int GL.GL_POLYGON_OFFSET_POINT
Used in glEnable, glGet, glIsEnabled, glPolygonOffset and
glPushAttrib
constant int GL.GL_POLYGON_OFFSET_UNITS
Used in glGet, glPolygonOffset and glPushAttrib
constant int GL.GL_POLYGON_SMOOTH
Used in glBlendFunc, glEnable, glGet, glIsEnabled,
glPolygonMode and glPushAttrib
constant int GL.GL_POLYGON_SMOOTH_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_POLYGON_STIPPLE
Used in glEnable, glGet, glIsEnabled, glPolygonMode and
glPushAttrib
constant int GL.GL_POLYGON_STIPPLE_BIT
Used in glPushAttrib
constant int GL.GL_POLYGON_TOKEN
Used in glFeedbackBuffer
constant int GL.GL_POSITION
Used in glLight
constant int GL.GL_POST_COLOR_MATRIX_ALPHA_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_ALPHA_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_BLUE_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_BLUE_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_COLOR_TABLE
Used in glEnable, glGet, glIsEnabled, glTexImage1D and
glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_GREEN_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_GREEN_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_RED_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_COLOR_MATRIX_RED_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_ALPHA_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_ALPHA_BIAS_EXT
constant int GL.GL_POST_CONVOLUTION_ALPHA_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_ALPHA_SCALE_EXT
constant int GL.GL_POST_CONVOLUTION_BLUE_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_BLUE_BIAS_EXT
constant int GL.GL_POST_CONVOLUTION_BLUE_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_BLUE_SCALE_EXT
constant int GL.GL_POST_CONVOLUTION_COLOR_TABLE
Used in glEnable, glGet, glIsEnabled, glTexImage1D and
glTexImage2D
constant int GL.GL_POST_CONVOLUTION_COLOR_TABLE_SGI
constant int GL.GL_POST_CONVOLUTION_GREEN_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_GREEN_BIAS_EXT
constant int GL.GL_POST_CONVOLUTION_GREEN_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_GREEN_SCALE_EXT
constant int GL.GL_POST_CONVOLUTION_RED_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_RED_BIAS_EXT
constant int GL.GL_POST_CONVOLUTION_RED_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_POST_CONVOLUTION_RED_SCALE_EXT
constant int GL.GL_PREVIOUS
Used in glTexEnv
constant int GL.GL_PRIMARY_COLOR
Used in glTexEnv
constant int GL.GL_PROJECTION
Used in glFrustum, glMatrixMode, glOrtho, glPushMatrix,
glRotate, glScale and glTranslate
constant int GL.GL_PROJECTION_MATRIX
Used in glFrustum, glGet, glLoadIdentity, glLoadMatrix,
glMultMatrix, glOrtho, glPushMatrix, glRotate, glScale
and glTranslate
constant int GL.GL_PROJECTION_STACK_DEPTH
Used in glGet and glPushMatrix
constant int GL.GL_PROXY_COLOR_TABLE
Used in glNewList
constant int GL.GL_PROXY_COLOR_TABLE_SGI
constant int GL.GL_PROXY_HISTOGRAM
Used in glNewList
constant int GL.GL_PROXY_HISTOGRAM_EXT
constant int GL.GL_PROXY_PIXEL_TRANSFORM_COLOR_TABLE_EXT
constant int GL.GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE
Used in glNewList
constant int GL.GL_PROXY_POST_CONVOLUTION_COLOR_TABLE
Used in glNewList
constant int GL.GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI
constant int GL.GL_PROXY_TEXTURE_1D
Used in glGet, glNewList and glTexImage1D
constant int GL.GL_PROXY_TEXTURE_2D
Used in glGet and glTexImage2D
constant int GL.GL_PROXY_TEXTURE_3D
Used in glGet and glNewList
constant int GL.GL_PROXY_TEXTURE_3D_EXT
constant int GL.GL_PROXY_TEXTURE_COLOR_TABLE_SGI
constant int GL.GL_PROXY_TEXTURE_CUBE_MAP
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGet and
glTexImage2D
constant int GL.GL_Q
Used in glTexGen
constant int GL.GL_QUADRATIC_ATTENUATION
Used in glLight
constant int GL.GL_QUADS
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_QUAD_STRIP
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_R
Used in glTexGen
constant int GL.GL_R3_G3_B2
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_READ_BUFFER
Used in glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D, glGet,
glPushAttrib and glReadBuffer
constant int GL.GL_RED
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_REDUCE
Used in glTexImage1D and glTexImage2D
constant int GL.GL_REDUCE_EXT
constant int GL.GL_RED_BIAS
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_RED_BITS
Used in glGet
constant int GL.GL_RED_SCALE
Used in glCopyPixels, glDrawPixels, glGet, glPushAttrib,
glReadPixels, glTexImage1D and glTexImage2D
constant int GL.GL_REFLECTION_MAP
Used in glTexGen
constant int GL.GL_RENDER
Used in glGet and glRenderMode
constant int GL.GL_RENDERER
Used in glGetString
constant int GL.GL_RENDER_MODE
Used in glFeedbackBuffer, glGet, glPassThrough and
glRenderMode
constant int GL.GL_REPEAT
Used in glTexParameter
constant int GL.GL_REPLACE
Used in glStencilOp and glTexEnv
constant int GL.GL_REPLICATE_BORDER
constant int GL.GL_REPLICATE_BORDER_HP
constant int GL.GL_RESCALE_NORMAL
Used in glEnable, glGet, glIsEnabled, glNormal and
glPushAttrib
constant int GL.GL_RESCALE_NORMAL_EXT
constant int GL.GL_RETURN
Used in glAccum
constant int GL.GL_RGB
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexEnv, glTexImage1D,
glTexImage2D, glTexSubImage1D and glTexSubImage2D
constant int GL.GL_RGB10
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB10_A2
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB5
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB5_A1
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGB8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA
Used in glCopyTexImage1D, glCopyTexImage2D, glDrawPixels,
glGetTexImage, glReadPixels, glTexEnv, glTexImage1D,
glTexImage2D, glTexSubImage1D and glTexSubImage2D
constant int GL.GL_RGBA12
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA16
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA2
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA4
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_RGBA_MODE
Used in glColor, glColorMask and glGet
constant int GL.GL_RGB_SCALE
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexEnv, glTexImage1D and glTexImage2D
constant int GL.GL_RIGHT
Used in glDrawBuffer and glReadBuffer
constant int GL.GL_S
Used in glTexGen
constant int GL.GL_SAMPLES
Used in glGet
constant int GL.GL_SAMPLE_ALPHA_TO_COVERAGE
Used in glEnable, glIsEnabled and glPushAttrib
constant int GL.GL_SAMPLE_ALPHA_TO_ONE
Used in glEnable, glIsEnabled and glPushAttrib
constant int GL.GL_SAMPLE_BUFFERS
Used in glGet
constant int GL.GL_SAMPLE_COVERAGE
Used in glEnable, glIsEnabled and glPushAttrib
constant int GL.GL_SAMPLE_COVERAGE_INVERT
Used in glEnable, glGet and glPushAttrib
constant int GL.GL_SAMPLE_COVERAGE_VALUE
Used in glGet and glPushAttrib
constant int GL.GL_SCISSOR_BIT
Used in glPushAttrib
constant int GL.GL_SCISSOR_BOX
Used in glGet and glScissor
constant int GL.GL_SCISSOR_TEST
Used in glEnable, glGet, glIsEnabled, glPushAttrib and
glScissor
constant int GL.GL_SECONDARY_COLOR_ARRAY
Used in glEnableClientState, glGet and glIsEnabled
constant int GL.GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING
Used in glGet
constant int GL.GL_SECONDARY_COLOR_ARRAY_SIZE
Used in glGet
constant int GL.GL_SECONDARY_COLOR_ARRAY_STRIDE
Used in glGet
constant int GL.GL_SECONDARY_COLOR_ARRAY_TYPE
Used in glGet
constant int GL.GL_SELECT
Used in glInitNames, glLoadName, glPushName, glRenderMode
and glSelectBuffer
constant int GL.GL_SELECTION_BUFFER_POINTER
Used in glSelectBuffer
constant int GL.GL_SELECTION_BUFFER_SIZE
Used in glGet and glSelectBuffer
constant int GL.GL_SEPARABLE_2D
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_SEPARABLE_2D_EXT
constant int GL.GL_SEPARATE_SPECULAR_COLOR
Used in glLightModel
constant int GL.GL_SET
Used in glLogicOp
constant int GL.GL_SGI_color_table
constant int GL.GL_SGI_texture_color_table
constant int GL.GL_SHADE_MODEL
Used in glGet, glPushAttrib and glShadeModel
constant int GL.GL_SHADING_LANGUAGE_VERSION
Used in glGetString
constant int GL.GL_SHININESS
Used in glMaterial
constant int GL.GL_SHORT
Used in glColorPointer, glDrawPixels, glGetTexImage,
glIndexPointer, glNormalPointer, glReadPixels,
glTexCoordPointer, glTexImage1D, glTexImage2D,
glTexSubImage1D, glTexSubImage2D and glVertexPointer
constant int GL.GL_SINGLE_COLOR
Used in glGet and glLightModel
constant int GL.GL_SLUMINANCE
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SLUMINANCE8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SLUMINANCE8_ALPHA8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SLUMINANCE_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SMOOTH
Used in glGet and glShadeModel
constant int GL.GL_SMOOTH_LINE_WIDTH_GRANULARITY
Used in glGet and glLineWidth
constant int GL.GL_SMOOTH_LINE_WIDTH_RANGE
Used in glGet and glLineWidth
constant int GL.GL_SMOOTH_POINT_SIZE_GRANULARITY
Used in glGet and glPointSize
constant int GL.GL_SMOOTH_POINT_SIZE_RANGE
Used in glGet and glPointSize
constant int GL.GL_SOURCE0_ALPHA
constant int GL.GL_SOURCE0_RGB
constant int GL.GL_SOURCE1_ALPHA
constant int GL.GL_SOURCE1_RGB
constant int GL.GL_SOURCE2_ALPHA
constant int GL.GL_SOURCE2_RGB
constant int GL.GL_SPECULAR
Used in glColorMaterial, glLight and glMaterial
constant int GL.GL_SPHERE_MAP
Used in glTexGen
constant int GL.GL_SPOT_CUTOFF
Used in glLight
constant int GL.GL_SPOT_DIRECTION
Used in glLight
constant int GL.GL_SPOT_EXPONENT
Used in glLight
constant int GL.GL_SRC0_ALPHA
Used in glTexEnv
constant int GL.GL_SRC0_RGB
Used in glTexEnv
constant int GL.GL_SRC1_ALPHA
Used in glTexEnv
constant int GL.GL_SRC1_RGB
Used in glTexEnv
constant int GL.GL_SRC2_ALPHA
Used in glTexEnv
constant int GL.GL_SRC2_RGB
Used in glTexEnv
constant int GL.GL_SRC_ALPHA
Used in glBlendFunc and glTexEnv
constant int GL.GL_SRC_ALPHA_SATURATE
Used in glBlendFunc
constant int GL.GL_SRC_COLOR
Used in glBlendFunc and glTexEnv
constant int GL.GL_SRGB
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SRGB8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SRGB8_ALPHA8
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_SRGB_ALPHA
Used in glCopyTexImage1D, glCopyTexImage2D, glTexImage1D and
glTexImage2D
constant int GL.GL_STACK_OVERFLOW
Used in glGetError, glPushAttrib, glPushClientAttrib,
glPushMatrix and glPushName
constant int GL.GL_STACK_UNDERFLOW
Used in glGetError, glPushAttrib, glPushClientAttrib,
glPushMatrix and glPushName
constant int GL.GL_STENCIL
Used in glCopyPixels
constant int GL.GL_STENCIL_BACK_FAIL
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_BACK_FUNC
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_BACK_PASS_DEPTH_FAIL
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_BACK_PASS_DEPTH_PASS
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_BACK_REF
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_BACK_VALUE_MASK
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_BACK_WRITEMASK
Used in glGet and glStencilMask
constant int GL.GL_STENCIL_BITS
Used in glClearStencil, glGet, glStencilFunc,
glStencilMask and glStencilOp
constant int GL.GL_STENCIL_BUFFER_BIT
Used in glClear and glPushAttrib
constant int GL.GL_STENCIL_CLEAR_VALUE
Used in glClear, glClearStencil and glGet
constant int GL.GL_STENCIL_FAIL
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_FUNC
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_INDEX
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D and glTexImage2D
constant int GL.GL_STENCIL_PASS_DEPTH_FAIL
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_PASS_DEPTH_PASS
Used in glGet and glStencilOp
constant int GL.GL_STENCIL_REF
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_TEST
Used in glEnable, glGet, glIsEnabled, glPushAttrib,
glStencilFunc and glStencilOp
constant int GL.GL_STENCIL_VALUE_MASK
Used in glGet and glStencilFunc
constant int GL.GL_STENCIL_WRITEMASK
Used in glGet and glStencilMask
constant int GL.GL_STEREO
Used in glGet
constant int GL.GL_SUBPIXEL_BITS
Used in glGet
constant int GL.GL_SUBTRACT
Used in glTexEnv
constant int GL.GL_SUNX_geometry_compression
constant int GL.GL_SUNX_surface_hint
constant int GL.GL_SUN_convolution_border_modes
constant int GL.GL_SUN_multi_draw_arrays
constant int GL.GL_SURFACE_SIZE_HINT_SUNX
constant int GL.GL_T
Used in glTexGen
constant int GL.GL_T2F_C3F_V3F
Used in glInterleavedArrays
constant int GL.GL_T2F_C4F_N3F_V3F
Used in glInterleavedArrays
constant int GL.GL_T2F_C4UB_V3F
Used in glInterleavedArrays
constant int GL.GL_T2F_N3F_V3F
Used in glInterleavedArrays
constant int GL.GL_T2F_V3F
Used in glInterleavedArrays
constant int GL.GL_T4F_C4F_N3F_V4F
Used in glInterleavedArrays
constant int GL.GL_T4F_V4F
Used in glInterleavedArrays
constant int GL.GL_TABLE_TOO_LARGE
Used in glGetError
constant int GL.GL_TABLE_TOO_LARGE_EXT
constant int GL.GL_TEXTURE
Used in glMatrixMode, glPushMatrix and glTexEnv
constant int GL.GL_TEXTURE0
Used in glFeedbackBuffer, glGet and glTexCoord
constant int GL.GL_TEXTURE0_ARB
constant int GL.GL_TEXTURE1
constant int GL.GL_TEXTURE10
constant int GL.GL_TEXTURE10_ARB
constant int GL.GL_TEXTURE11
constant int GL.GL_TEXTURE11_ARB
constant int GL.GL_TEXTURE12
constant int GL.GL_TEXTURE12_ARB
constant int GL.GL_TEXTURE13
constant int GL.GL_TEXTURE13_ARB
constant int GL.GL_TEXTURE14
constant int GL.GL_TEXTURE14_ARB
constant int GL.GL_TEXTURE15
constant int GL.GL_TEXTURE15_ARB
constant int GL.GL_TEXTURE16
constant int GL.GL_TEXTURE16_ARB
constant int GL.GL_TEXTURE17
constant int GL.GL_TEXTURE17_ARB
constant int GL.GL_TEXTURE18
constant int GL.GL_TEXTURE18_ARB
constant int GL.GL_TEXTURE19
constant int GL.GL_TEXTURE19_ARB
constant int GL.GL_TEXTURE1_ARB
constant int GL.GL_TEXTURE2
constant int GL.GL_TEXTURE20
constant int GL.GL_TEXTURE20_ARB
constant int GL.GL_TEXTURE21
constant int GL.GL_TEXTURE21_ARB
constant int GL.GL_TEXTURE22
constant int GL.GL_TEXTURE22_ARB
constant int GL.GL_TEXTURE23
constant int GL.GL_TEXTURE23_ARB
constant int GL.GL_TEXTURE24
constant int GL.GL_TEXTURE24_ARB
constant int GL.GL_TEXTURE25
constant int GL.GL_TEXTURE25_ARB
constant int GL.GL_TEXTURE26
constant int GL.GL_TEXTURE26_ARB
constant int GL.GL_TEXTURE27
constant int GL.GL_TEXTURE27_ARB
constant int GL.GL_TEXTURE28
constant int GL.GL_TEXTURE28_ARB
constant int GL.GL_TEXTURE29
constant int GL.GL_TEXTURE29_ARB
constant int GL.GL_TEXTURE2_ARB
constant int GL.GL_TEXTURE3
constant int GL.GL_TEXTURE30
constant int GL.GL_TEXTURE30_ARB
constant int GL.GL_TEXTURE31
constant int GL.GL_TEXTURE31_ARB
constant int GL.GL_TEXTURE3_ARB
constant int GL.GL_TEXTURE4
constant int GL.GL_TEXTURE4_ARB
constant int GL.GL_TEXTURE5
constant int GL.GL_TEXTURE5_ARB
constant int GL.GL_TEXTURE6
constant int GL.GL_TEXTURE6_ARB
constant int GL.GL_TEXTURE7
constant int GL.GL_TEXTURE7_ARB
constant int GL.GL_TEXTURE8
constant int GL.GL_TEXTURE8_ARB
constant int GL.GL_TEXTURE9
constant int GL.GL_TEXTURE9_ARB
constant int GL.GL_TEXTURE_1D
Used in glBindTexture, glCopyTexImage1D, glCopyTexSubImage1D,
glEnable, glGet, glGetTexImage, glIsEnabled,
glPushAttrib, glTexImage1D, glTexParameter and
glTexSubImage1D
constant int GL.GL_TEXTURE_1D_BINDING
constant int GL.GL_TEXTURE_2D
Used in glBindTexture, glCopyTexImage2D, glCopyTexSubImage2D,
glEnable, glGet, glGetTexImage, glIsEnabled,
glPushAttrib, glTexImage2D, glTexParameter and
glTexSubImage2D
constant int GL.GL_TEXTURE_2D_BINDING
constant int GL.GL_TEXTURE_3D
Used in glBindTexture, glEnable, glGet, glGetTexImage,
glIsEnabled, glPushAttrib and glTexParameter
constant int GL.GL_TEXTURE_3D_BINDING
constant int GL.GL_TEXTURE_3D_EXT
constant int GL.GL_TEXTURE_ALPHA_SIZE
constant int GL.GL_TEXTURE_BASE_LEVEL
Used in glTexParameter
constant int GL.GL_TEXTURE_BINDING_1D
Used in glBindTexture and glGet
constant int GL.GL_TEXTURE_BINDING_2D
Used in glBindTexture, glGet and glPushAttrib
constant int GL.GL_TEXTURE_BINDING_3D
Used in glBindTexture and glGet
constant int GL.GL_TEXTURE_BINDING_CUBE_MAP
Used in glGet
constant int GL.GL_TEXTURE_BIT
Used in glPushAttrib
constant int GL.GL_TEXTURE_BLUE_SIZE
constant int GL.GL_TEXTURE_BORDER
Used in glCopyTexSubImage1D, glCopyTexSubImage2D,
glGetTexImage and glTexSubImage1D
constant int GL.GL_TEXTURE_BORDER_COLOR
Used in glTexParameter
constant int GL.GL_TEXTURE_COLOR_TABLE_SGI
constant int GL.GL_TEXTURE_COMPARE_FUNC
Used in glTexParameter
constant int GL.GL_TEXTURE_COMPARE_MODE
Used in glTexParameter
constant int GL.GL_TEXTURE_COMPONENTS
constant int GL.GL_TEXTURE_COMPRESSED
constant int GL.GL_TEXTURE_COMPRESSED_IMAGE_SIZE
constant int GL.GL_TEXTURE_COMPRESSION_HINT
Used in glGet, glHint and glPushAttrib
constant int GL.GL_TEXTURE_COORD_ARRAY
Used in glEnableClientState, glGet, glIsEnabled and
glTexCoordPointer
constant int GL.GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING
Used in glGet and glTexCoordPointer
constant int GL.GL_TEXTURE_COORD_ARRAY_POINTER
Used in glTexCoordPointer
constant int GL.GL_TEXTURE_COORD_ARRAY_SIZE
Used in glGet, glIsEnabled and glTexCoordPointer
constant int GL.GL_TEXTURE_COORD_ARRAY_STRIDE
Used in glGet, glIsEnabled and glTexCoordPointer
constant int GL.GL_TEXTURE_COORD_ARRAY_TYPE
Used in glGet, glIsEnabled and glTexCoordPointer
constant int GL.GL_TEXTURE_CUBE_MAP
Used in glBindTexture, glCopyTexImage2D, glEnable, glGet,
glIsEnabled, glTexImage2D and glTexParameter
constant int GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_X
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Y
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_CUBE_MAP_POSITIVE_Z
Used in glCopyTexImage2D, glCopyTexSubImage2D, glGetTexImage,
glTexImage2D and glTexSubImage2D
constant int GL.GL_TEXTURE_DEPTH
constant int GL.GL_TEXTURE_DEPTH_EXT
constant int GL.GL_TEXTURE_ENV
Used in glTexEnv
constant int GL.GL_TEXTURE_ENV_COLOR
Used in glTexEnv
constant int GL.GL_TEXTURE_ENV_MODE
Used in glTexEnv
constant int GL.GL_TEXTURE_FILTER_CONTROL
Used in glTexEnv
constant int GL.GL_TEXTURE_GEN_MODE
Used in glPushAttrib and glTexGen
constant int GL.GL_TEXTURE_GEN_Q
Used in glEnable, glGet, glIsEnabled, glPushAttrib and
glTexGen
constant int GL.GL_TEXTURE_GEN_R
Used in glEnable, glGet, glIsEnabled, glPushAttrib and
glTexGen
constant int GL.GL_TEXTURE_GEN_S
Used in glEnable, glGet, glIsEnabled, glPushAttrib and
glTexGen
constant int GL.GL_TEXTURE_GEN_T
Used in glEnable, glGet, glIsEnabled, glPushAttrib and
glTexGen
constant int GL.GL_TEXTURE_GREEN_SIZE
constant int GL.GL_TEXTURE_HEIGHT
Used in glCopyTexSubImage2D, glGetTexImage and
glTexSubImage2D
constant int GL.GL_TEXTURE_INTENSITY_SIZE
constant int GL.GL_TEXTURE_INTERNAL_FORMAT
Used in glGetTexImage
constant int GL.GL_TEXTURE_LOD_BIAS
Used in glCopyPixels, glDrawPixels, glReadPixels,
glTexEnv, glTexImage1D and glTexImage2D
constant int GL.GL_TEXTURE_LUMINANCE_SIZE
constant int GL.GL_TEXTURE_MAG_FILTER
Used in glTexParameter
constant int GL.GL_TEXTURE_MATRIX
Used in glFrustum, glGet, glIsEnabled, glLoadIdentity,
glLoadMatrix, glMultMatrix, glOrtho, glPushMatrix,
glRotate, glScale and glTranslate
constant int GL.GL_TEXTURE_MAX_LEVEL
Used in glTexParameter
constant int GL.GL_TEXTURE_MAX_LOD
Used in glTexParameter
constant int GL.GL_TEXTURE_MIN_FILTER
Used in glTexEnv and glTexParameter
constant int GL.GL_TEXTURE_MIN_LOD
Used in glTexParameter
constant int GL.GL_TEXTURE_PRIORITY
Used in glTexParameter
constant int GL.GL_TEXTURE_RED_SIZE
constant int GL.GL_TEXTURE_RESIDENT
constant int GL.GL_TEXTURE_STACK_DEPTH
Used in glGet, glIsEnabled and glPushMatrix
constant int GL.GL_TEXTURE_WIDTH
Used in glCopyTexSubImage1D, glCopyTexSubImage2D,
glGetTexImage, glTexSubImage1D and glTexSubImage2D
constant int GL.GL_TEXTURE_WRAP_R
Used in glTexParameter
constant int GL.GL_TEXTURE_WRAP_R_EXT
constant int GL.GL_TEXTURE_WRAP_S
Used in glTexParameter
constant int GL.GL_TEXTURE_WRAP_T
Used in glTexParameter
constant int GL.GL_TRANSFORM_BIT
Used in glPushAttrib
constant int GL.GL_TRANSPOSE_COLOR_MATRIX
Used in glGet
constant int GL.GL_TRANSPOSE_MODELVIEW_MATRIX
Used in glGet
constant int GL.GL_TRANSPOSE_PROJECTION_MATRIX
Used in glGet
constant int GL.GL_TRANSPOSE_TEXTURE_MATRIX
Used in glGet
constant int GL.GL_TRIANGLES
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_TRIANGLE_FAN
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_TRIANGLE_STRIP
Used in glBegin, glDrawArrays and glDrawElements
constant int GL.GL_TRUE
Used in glColorMask, glEdgeFlag, glEnable, glGet,
glIsEnabled, glIsList, glIsTexture and glReadPixels
constant int GL.GL_UNPACK_ALIGNMENT
Used in glDrawPixels and glGet
constant int GL.GL_UNPACK_IMAGE_HEIGHT
Used in glGet
constant int GL.GL_UNPACK_IMAGE_HEIGHT_EXT
constant int GL.GL_UNPACK_LSB_FIRST
Used in glDrawPixels, glGet, glTexImage1D and glTexImage2D
constant int GL.GL_UNPACK_ROW_LENGTH
Used in glGet
constant int GL.GL_UNPACK_SKIP_IMAGES
Used in glGet
constant int GL.GL_UNPACK_SKIP_IMAGES_EXT
constant int GL.GL_UNPACK_SKIP_PIXELS
Used in glGet
constant int GL.GL_UNPACK_SKIP_ROWS
Used in glGet
constant int GL.GL_UNPACK_SWAP_BYTES
Used in glGet
constant int GL.GL_UNSIGNED_BYTE
Used in glColorPointer, glDrawPixels, glGetTexImage,
glIndexPointer, glReadPixels, glTexImage1D, glTexImage2D,
glTexSubImage1D and glTexSubImage2D
constant int GL.GL_UNSIGNED_BYTE_2_3_3_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_BYTE_3_3_2
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_INT
Used in glColorPointer, glDrawPixels, glGetTexImage,
glReadPixels, glTexImage1D, glTexImage2D, glTexSubImage1D
and glTexSubImage2D
constant int GL.GL_UNSIGNED_INT_10_10_10_2
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_INT_2_10_10_10_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_INT_8_8_8_8
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_INT_8_8_8_8_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT
Used in glColorPointer, glDrawPixels, glGetTexImage,
glReadPixels, glTexImage1D, glTexImage2D, glTexSubImage1D
and glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_1_5_5_5_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_4_4_4_4
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_4_4_4_4_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_5_5_5_1
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_5_6_5
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_UNSIGNED_SHORT_5_6_5_REV
Used in glDrawPixels, glGetTexImage, glReadPixels,
glTexImage1D, glTexImage2D, glTexSubImage1D and
glTexSubImage2D
constant int GL.GL_V2F
Used in glInterleavedArrays
constant int GL.GL_V3F
Used in glInterleavedArrays
constant int GL.GL_VENDOR
Used in glGetString
constant int GL.GL_VERSION
Used in glGetString
constant int GL.GL_VERSION_1_1
constant int GL.GL_VERSION_1_2
constant int GL.GL_VERSION_1_3
constant int GL.GL_VERTEX_ARRAY
Used in glArrayElement, glDrawArrays, glDrawElements,
glEnableClientState, glGet, glIsEnabled and
glVertexPointer
constant int GL.GL_VERTEX_ARRAY_BUFFER_BINDING
Used in glGet and glVertexPointer
constant int GL.GL_VERTEX_ARRAY_POINTER
Used in glVertexPointer
constant int GL.GL_VERTEX_ARRAY_SIZE
Used in glGet and glVertexPointer
constant int GL.GL_VERTEX_ARRAY_STRIDE
Used in glGet and glVertexPointer
constant int GL.GL_VERTEX_ARRAY_TYPE
Used in glGet and glVertexPointer
constant int GL.GL_VERTEX_PROGRAM_POINT_SIZE
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_VERTEX_PROGRAM_TWO_SIDE
Used in glEnable, glGet and glIsEnabled
constant int GL.GL_VIEWPORT
Used in glGet and glViewport
constant int GL.GL_VIEWPORT_BIT
Used in glPushAttrib
constant int GL.GL_WRAP_BORDER_SUN
constant int GL.GL_XOR
Used in glLogicOp
constant int GL.GL_ZERO
Used in glBlendFunc, glGet and glStencilOp
constant int GL.GL_ZOOM_X
Used in glCopyPixels, glDrawPixels, glGet, glPixelZoom and
glPushAttrib
constant int GL.GL_ZOOM_Y
Used in glCopyPixels, glDrawPixels, glGet, glPixelZoom and
glPushAttrib
void glAccum(int op, float value)
The accumulation buffer is an extended-range color buffer. Images are not rendered into it. Rather, images rendered into one of the color buffers are added to the contents of the accumulation buffer after rendering. Effects such as antialiasing (of points, lines, and polygons), motion blur, and depth of field can be created by accumulating images generated with different transformation matrices.
Each pixel in the accumulation buffer consists of red, green, blue,
and alpha values. The number of bits per component in the accumulation
buffer depends on the implementation. You can examine this number by
calling glGet four times, with arguments GL_ACCUM_RED_BITS,
GL_ACCUM_GREEN_BITS, GL_ACCUM_BLUE_BITS, and
GL_ACCUM_ALPHA_BITS. Regardless of the number of bits per
component, the range of values stored by each component is [-1, 1].
The accumulation buffer pixels are mapped one-to-one with frame buffer
pixels.
glAccum operates on the accumulation buffer. The first argument,
op, is a symbolic constant that selects an accumulation buffer
operation. The second argument, value, is a floating-point value
to be used in that operation. Five operations are specified:
GL_ACCUM, GL_LOAD, GL_ADD, GL_MULT, and GL_RETURN.
All accumulation buffer operations are limited to the area of the
current scissor box and applied identically to the red, green, blue,
and alpha components of each pixel. If a glAccum operation results
in a value outside the range [-1, 1], the contents of an accumulation
buffer pixel component are undefined.
The operations are as follows:
GL_ACCUM | Obtains R, G, B, and A values from the buffer currently selected
for reading (see |
GL_LOAD | Similar to |
GL_ADD | Adds value to each R, G, B, and A in the accumulation buffer. |
GL_MULT | Multiplies each R, G, B, and A in the accumulation buffer by value and returns the scaled component to its corresponding accumulation buffer location. |
GL_RETURN | Transfers accumulation buffer values to the color buffer or buffers currently selected for writing. Each R, G, B, and A component is multiplied by value, then multiplied by 2n-1, clamped to the range [0, 2n-1], and stored in the corresponding display buffer cell. The only fragment operations that are applied to this transfer are pixel ownership, scissor, dithering, and color writemasks. |
glClearAccum with
R, G, B, and A values to set it to, then call glClear with the
accumulation buffer enabled.
opSpecifies the accumulation buffer operation. Symbolic constants
GL_ACCUM, GL_LOAD, GL_ADD, GL_MULT, and GL_RETURN are
accepted.
valueSpecifies a floating-point value used in the accumulation buffer operation. op determines how value is used.
GL_INVALID_ENUM is generated if op is not an accepted value.
GL_INVALID_OPERATION is generated if there is no accumulation
buffer.
GL_INVALID_OPERATION is generated if glAccum is executed between
the execution of glBegin and the corresponding execution of
glEnd.
Only pixels within the current scissor box are updated by a glAccum
operation.
glClear, glClearAccum, glCopyPixels, glDrawBuffer,
glGet, glReadBuffer, glReadPixels, glScissor,
glStencilOp
private void glUnimplemented()
private void glActiveTexture()
private void glAreTexturesResident()
private void glAttachShader()
private void glBeginQuery()
private void glBindAttribLocation()
private void glBindBuffer()
private void glBitmap()
private void glBlendColor()
private void glBlendEquation()
private void glBlendEquationSeparate()
private void glBlendFuncSeparate()
private void glBufferData()
private void glBufferSubData()
private void glClientActiveTexture()
private void glColorSubTable()
private void glColorTable()
private void glColorTableParameter()
private void glCompileShader()
private void glCompressedTexImage1D()
private void glCompressedTexImage2D()
private void glCompressedTexImage3D()
private void glCompressedTexSubImage1D()
private void glCompressedTexSubImage2D()
private void glCompressedTexSubImage3D()
private void glConvolutionFilter1D()
private void glConvolutionFilter2D()
private void glConvolutionParameter()
private void glCopyColorSubTable()
private void glCopyColorTable()
private void glCopyConvolutionFilter1D()
private void glCopyConvolutionFilter2D()
private void glCopyTexSubImage3D()
private void glCreateProgram()
private void glCreateShader()
private void glDeleteBuffers()
private void glDeleteProgram()
private void glDeleteQueries()
private void glDeleteShader()
private void glDetachShader()
private void glDrawBuffers()
private void glDrawRangeElements()
private void glEnableVertexAttribArray()
private void glFogCoord()
private void glFogCoordPointer()
private void glGenBuffers()
private void glGenQueries()
private void glGetActiveAttrib()
private void glGetActiveUniform()
private void glGetAttachedShaders()
private void glGetAttribLocation()
private void glGetBufferParameteriv()
private void glGetBufferPointerv()
private void glGetBufferSubData()
private void glGetClipPlane()
private void glGetColorTable()
private void glGetColorTableParameter()
private void glGetCompressedTexImage()
private void glGetConvolutionFilter()
private void glGetConvolutionParameter()
private void glGetHistogram()
private void glGetHistogramParameter()
private void glGetLight()
private void glGetMap()
private void glGetMaterial()
private void glGetMinmax()
private void glGetMinmaxParameter()
private void glGetPixelMap()
private void glGetPointerv()
private void glGetPolygonStipple()
private void glGetProgram()
private void glGetProgramInfoLog()
private void glGetQueryObject()
private void glGetQueryiv()
private void glGetSeparableFilter()
private void glGetShader()
private void glGetShaderInfoLog()
private void glGetShaderSource()
private void glGetTexEnv()
private void glGetTexGen()
private void glGetTexLevelParameter()
private void glGetTexParameter()
private void glGetUniform()
private void glGetUniformLocation()
private void glGetVertexAttrib()
private void glGetVertexAttribPointerv()
private void glHistogram()
private void glIsBuffer()
private void glIsProgram()
private void glIsQuery()
private void glIsShader()
private void glLinkProgram()
private void glLoadTransposeMatrix()
private void glMap1()
private void glMap2()
private void glMapBuffer()
private void glMinmax()
private void glMultTransposeMatrix()
private void glMultiDrawArrays()
private void glMultiDrawElements()
private void glMultiTexCoord()
private void glPixelMap()
private void glPixelStore()
private void glPixelTransfer()
private void glPointParameter()
private void glPolygonStipple()
private void glPrioritizeTextures()
private void glRect()
private void glResetHistogram()
private void glResetMinmax()
private void glSampleCoverage()
private void glSecondaryColor()
private void glSecondaryColorPointer()
private void glSeparableFilter2D()
private void glShaderSource()
private void glStencilFuncSeparate()
private void glStencilMaskSeparate()
private void glStencilOpSeparate()
private void glTexImage3D()
private void glTexSubImage3D()
private void glUniform()
private void glUseProgram()
private void glValidateProgram()
private void glVertexAttrib()
private void glVertexAttribPointer()
private void glWindowPos()
private void glXChooseFBConfig()
private void glXChooseVisual()
private void glXCopyContext()
private void glXCreateContext()
private void glXCreateGLXPixmap()
private void glXCreateNewContext()
private void glXCreatePbuffer()
private void glXCreatePixmap()
private void glXCreateWindow()
private void glXDestroyContext()
private void glXDestroyGLXPixmap()
private void glXDestroyPbuffer()
private void glXDestroyPixmap()
private void glXDestroyWindow()
private void glXFreeContextEXT()
private void glXGetClientString()
private void glXGetConfig()
private void glXGetContextIDEXT()
private void glXGetCurrentContext()
private void glXGetCurrentDisplay()
private void glXGetCurrentDrawable()
private void glXGetCurrentReadDrawable()
private void glXGetFBConfigAttrib()
private void glXGetFBConfigs()
private void glXGetProcAddress()
private void glXGetSelectedEvent()
private void glXGetVisualFromFBConfig()
private void glXImportContextEXT()
private void glXIsDirect()
private void glXMakeContextCurrent()
private void glXMakeCurrent()
private void glXQueryContext()
private void glXQueryContextInfoEXT()
private void glXQueryDrawable()
private void glXQueryExtension()
private void glXQueryExtensionsString()
private void glXQueryServerString()
private void glXQueryVersion()
private void glXSelectEvent()
private void glXSwapBuffers()
private void glXUseXFont()
private void glXWaitGL()
private void glXWaitX()
private void gluBeginCurve()
private void gluBeginPolygon()
private void gluBeginSurface()
private void gluBeginTrim()
private void gluBuild1DMipmapLevels()
private void gluBuild1DMipmaps()
private void gluBuild2DMipmapLevels()
private void gluBuild2DMipmaps()
private void gluBuild3DMipmapLevels()
private void gluBuild3DMipmaps()
private void gluCheckExtension()
private void gluCylinder()
private void gluDeleteNurbsRenderer()
private void gluDeleteQuadric()
private void gluDeleteTess()
private void gluDisk()
private void gluErrorString()
private void gluGetNurbsProperty()
private void gluGetString()
private void gluGetTessProperty()
private void gluLoadSamplingMatrices()
private void gluLookAt()
private void gluNewNurbsRenderer()
private void gluNewQuadric()
private void gluNewTess()
private void gluNextContour()
private void gluNurbsCallback()
private void gluNurbsCallbackData()
private void gluNurbsCallbackDataEXT()
private void gluNurbsCurve()
private void gluNurbsProperty()
private void gluNurbsSurface()
private void gluOrtho2D()
private void gluPartialDisk()
private void gluPerspective()
private void gluPickMatrix()
private void gluProject()
private void gluPwlCurve()
private void gluQuadricCallback()
private void gluQuadricDrawStyle()
private void gluQuadricNormals()
private void gluQuadricOrientation()
private void gluQuadricTexture()
private void gluScaleImage()
private void gluSphere()
private void gluTessBeginContour()
private void gluTessBeginPolygon()
private void gluTessCallback()
private void gluTessEndPolygon()
private void gluTessNormal()
private void gluTessProperty()
private void gluTessVertex()
private void gluUnProject()
private void gluUnProject4()
These OpenGL methods are still missing in the Pike GL API.
GL
void glAlphaFunc(int func, float ref)
The alpha test discards fragments depending on the outcome of a
comparison between an incoming fragment's alpha value and a constant
reference value. glAlphaFunc specifies the reference value and the
comparison function. The comparison is performed only if alpha testing
is enabled. By default, it is not enabled. (See glEnable and
glDisable of GL_ALPHA_TEST.)
func and ref specify the conditions under which the pixel is drawn. The incoming alpha value is compared to ref using the function specified by func. If the value passes the comparison, the incoming fragment is drawn if it also passes subsequent stencil and depth buffer tests. If the value fails the comparison, no change is made to the frame buffer at that pixel location. The comparison functions are as follows:
GL_NEVER | Never passes. |
GL_LESS | Passes if the incoming alpha value is less than the reference value. |
GL_EQUAL | Passes if the incoming alpha value is equal to the reference value. |
GL_LEQUAL | Passes if the incoming alpha value is less than or equal to the reference value. |
GL_GREATER | Passes if the incoming alpha value is greater than the reference value. |
GL_NOTEQUAL | Passes if the incoming alpha value is not equal to the reference value. |
GL_GEQUAL | Passes if the incoming alpha value is greater than or equal to the reference value. |
GL_ALWAYS | Always passes (initial value). |
glAlphaFunc operates on all pixel write operations,
including those resulting from the scan conversion of points, lines,
polygons, and bitmaps, and from pixel draw and copy operations.
glAlphaFunc does not affect screen clear operations.
funcSpecifies the alpha comparison function. Symbolic constants
GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER,
GL_NOTEQUAL, GL_GEQUAL, and GL_ALWAYS are accepted. The
initial value is GL_ALWAYS.
refSpecifies the reference value that incoming alpha values are compared to. This value is clamped to the range [0, 1], where 0 represents the lowest possible alpha value and 1 the highest possible value. The initial reference value is 0.
GL_INVALID_ENUM is generated if func is not an accepted value.
GL_INVALID_OPERATION is generated if glAlphaFunc is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Alpha testing is performed only in RGBA mode.
glBlendFunc, glClear, glDepthFunc, glEnable,
glStencilFunc
void glArrayElement(int i)
glArrayElement commands are used within glBegin/glEnd pairs
to specify vertex and attribute data for point, line, and polygon
primitives. If GL_VERTEX_ARRAY is enabled when glArrayElement is
called, a single vertex is drawn, using vertex and attribute data
taken from location i of the enabled arrays. If
GL_VERTEX_ARRAY is not enabled, no drawing occurs but the
attributes corresponding to the enabled arrays are modified.
Use glArrayElement to construct primitives by indexing vertex data,
rather than by streaming through arrays of data in first-to-last
order. Because each call specifies only a single vertex, it is
possible to explicitly specify per-primitive attributes such as a
single normal for each triangle.
Changes made to array data between the execution of glBegin and the
corresponding execution of glEnd may affect calls to
glArrayElement that are made within the same glBegin/glEnd
period in nonsequential ways. That is, a call to glArrayElement
that precedes a change to array data may access the changed data, and
a call that follows a change to array data may access original data.
iSpecifies an index into the enabled vertex data arrays.
GL_INVALID_VALUE may be generated if i is negative.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to an enabled array and the buffer object's data store is
currently mapped.
glArrayElement is available only if the GL version is 1.1 or
greater.
glArrayElement is included in display lists. If glArrayElement
is entered into a display list, the necessary array data (determined
by the array pointers and enables) is also entered into the display
list. Because the array pointers and enables are client-side state,
their values affect display lists when the lists are created, not when
the lists are executed.
glClientActiveTexture, glColorPointer, glDrawArrays,
glEdgeFlagPointer, glFogCoordPointer, glGetPointerv,
glIndexPointer, glInterleavedArrays, glNormalPointer,
glSecondaryColorPointer, glTexCoordPointer, glVertexPointer
void glBegin(int mode)
void glEnd()
glBegin and glEnd delimit the vertices that define a primitive
or a group of like primitives. glBegin accepts a single argument
that specifies in which of ten ways the vertices are interpreted.
Taking n as an integer count starting at one, and N as the
total number of vertices specified, the interpretations are as
follows:
GL_POINTS | Treats each vertex as a single point. Vertex n defines point n. N points are drawn. |
GL_LINES | Treats each pair of vertices as an independent line segment. Vertices 2n-1 and 2n define line n. N/2 lines are drawn. |
GL_LINE_STRIP | Draws a connected group of line segments from the first vertex to the last. Vertices n and n+1 define line n. N-1 lines are drawn. |
GL_LINE_LOOP | Draws a connected group of line segments from the first vertex to the last, then back to the first. Vertices n and n+1 define line n. The last line, however, is defined by vertices N and 1. N lines are drawn. |
GL_TRIANGLES | Treats each triplet of vertices as an independent triangle. Vertices 3n-2, 3n-1, and 3n define triangle n. N/3 triangles are drawn. |
GL_TRIANGLE_STRIP | Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. For odd n, vertices n, n+1, and n+2 define triangle n. For even n, vertices n+1, n, and n+2 define triangle n. N-2 triangles are drawn. |
GL_TRIANGLE_FAN | Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. Vertices 1, n+1, and n+2 define triangle n. N-2 triangles are drawn. |
GL_QUADS | Treats each group of four vertices as an independent quadrilateral. Vertices 4n-3, 4n-2, 4n-1, and 4n define quadrilateral n. N/4 quadrilaterals are drawn. |
GL_QUAD_STRIP | Draws a connected group of quadrilaterals. One quadrilateral is defined for each pair of vertices presented after the first pair. Vertices 2n-1, 2n, 2n+2, and 2n+1 define quadrilateral n. N/2-1 quadrilaterals are drawn. Note that the order in which vertices are used to construct a quadrilateral from strip data is different from that used with independent data. |
GL_POLYGON | Draws a single, convex polygon. Vertices 1 through N define this polygon. |
glBegin
and glEnd. The commands are glVertex, glColor,
glSecondaryColor, glIndex, glNormal, glFogCoord,
glTexCoord, glMultiTexCoord, glVertexAttrib, glEvalCoord,
glEvalPoint, glArrayElement, glMaterial, and glEdgeFlag.
Also, it is acceptable to use glCallList or glCallLists to
execute display lists that include only the preceding commands. If any
other GL command is executed between glBegin and glEnd, the
error flag is set and the command is ignored.
Regardless of the value chosen for mode, there is no limit to the
number of vertices that can be defined between glBegin and
glEnd. Lines, triangles, quadrilaterals, and polygons that are
incompletely specified are not drawn. Incomplete specification results
when either too few vertices are provided to specify even a single
primitive or when an incorrect multiple of vertices is specified. The
incomplete primitive is ignored; the rest are drawn.
The minimum specification of vertices for each primitive is as
follows: 1 for a point, 2 for a line, 3 for a triangle, 4 for a
quadrilateral, and 3 for a polygon. Modes that require a certain
multiple of vertices are GL_LINES (2), GL_TRIANGLES (3),
GL_QUADS (4), and GL_QUAD_STRIP (2).
modeSpecifies the primitive or primitives that will be created from
vertices presented between glBegin and the subsequent glEnd. Ten
symbolic constants are accepted: GL_POINTS, GL_LINES,
GL_LINE_STRIP, GL_LINE_LOOP, GL_TRIANGLES,
GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_QUADS,
GL_QUAD_STRIP, and GL_POLYGON.
GL_INVALID_ENUM is generated if mode is set to an unaccepted
value.
GL_INVALID_OPERATION is generated if glBegin is executed between
a glBegin and the corresponding execution of glEnd.
GL_INVALID_OPERATION is generated if glEnd is executed without
being preceded by a glBegin.
GL_INVALID_OPERATION is generated if a command other than
glVertex, glColor, glSecondaryColor, glIndex, glNormal,
glFogCoord, glTexCoord, glMultiTexCoord, glVertexAttrib,
glEvalCoord, glEvalPoint, glArrayElement, glMaterial,
glEdgeFlag, glCallList, or glCallLists is executed between
the execution of glBegin and the corresponding execution glEnd.
Execution of glEnableClientState, glDisableClientState,
glEdgeFlagPointer, glFogCoordPointer, glTexCoordPointer,
glColorPointer, glSecondaryColorPointer, glIndexPointer,
glNormalPointer, glVertexPointer, glVertexAttribPointer,
glInterleavedArrays, or glPixelStore is not allowed after a call
to glBegin and before the corresponding call to glEnd, but an
error may or may not be generated.
glArrayElement, glCallList, glCallLists, glColor,
glEdgeFlag, glEvalCoord, glEvalPoint, glFogCoord,
glIndex, glMaterial, glMultiTexCoord, glNormal,
glSecondaryColor, glTexCoord, glVertex, glVertexAttrib
void glBindTexture(int target, int texture)
glBindTexture lets you create or use a named texture. Calling
glBindTexture with target set to GL_TEXTURE_1D,
GL_TEXTURE_2D, GL_TEXTURE_3D or GL_TEXTURE_CUBE_MAP and
texture set to the name of the new texture binds the texture name
to the target. When a texture is bound to a target, the previous
binding for that target is automatically broken.
Texture names are unsigned integers. The value zero is reserved to
represent the default texture for each texture target. Texture names
and the corresponding texture contents are local to the shared
display-list space (see glXCreateContext) of the current GL
rendering context; two rendering contexts share texture names only if
they also share display lists.
You may use glGenTextures to generate a set of new texture names.
When a texture is first bound, it assumes the specified target: A
texture first bound to GL_TEXTURE_1D becomes one-dimensional
texture, a texture first bound to GL_TEXTURE_2D becomes
two-dimensional texture, a texture first bound to GL_TEXTURE_3D
becomes three-dimensional texture, and a texture first bound to
GL_TEXTURE_CUBE_MAP becomes a cube-mapped texture. The state of a
one-dimensional texture immediately after it is first bound is
equivalent to the state of the default GL_TEXTURE_1D at GL
initialization, and similarly for two- and three-dimensional textures
and cube-mapped textures.
While a texture is bound, GL operations on the target to which it is bound affect the bound texture, and queries of the target to which it is bound return state from the bound texture. If texture mapping is active on the target to which a texture is bound, the bound texture is used. In effect, the texture targets become aliases for the textures currently bound to them, and the texture name zero refers to the default textures that were bound to them at initialization.
A texture binding created with glBindTexture remains active until a
different texture is bound to the same target, or until the bound
texture is deleted with glDeleteTextures.
Once created, a named texture may be re-bound to its same original
target as often as needed. It is usually much faster to use
glBindTexture to bind an existing named texture to one of the
texture targets than it is to reload the texture image using
glTexImage1D, glTexImage2D, or glTexImage3D. For additional
control over performance, use glPrioritizeTextures.
glBindTexture is included in display lists.
targetSpecifies the target to which the texture is bound. Must be either
GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or
GL_TEXTURE_CUBE_MAP.
textureSpecifies the name of a texture.
GL_INVALID_ENUM is generated if target is not one of the
allowable values.
GL_INVALID_OPERATION is generated if texture was previously
created with a target that doesn't match that of target.
GL_INVALID_OPERATION is generated if glBindTexture is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glBindTexture is available only if the GL version is 1.1 or
greater.
GL_TEXTURE_CUBE_MAP is available only if the GL version is 1.3 or
greater.
glAreTexturesResident, glDeleteTextures, glGenTextures,
glGet, glGetTexParameter, glIsTexture,
glPrioritizeTextures, glTexImage1D, glTexImage2D,
glTexParameter
void glBlendFunc(int sfactor, int dfactor)
In RGBA mode, pixels can be drawn using a function that blends the
incoming (source) RGBA values with the RGBA values that are already in
the frame buffer (the destination values). Blending is initially
disabled. Use glEnable and glDisable with argument GL_BLEND
to enable and disable blending.
glBlendFunc defines the operation of blending when it is enabled.
sfactor specifies which method is used to scale the source color
components. dfactor specifies which method is used to scale the
destination color components. The possible methods are described in
the following table. Each method defines four scale factors, one each
for red, green, blue, and alpha. In the table and in subsequent
equations, source and destination color components are referred to as
(Rs, Gs, Bs,
As) and (Rd, Gd,
Bd, Ad). The color specified by
glBlendColor is referred to as (Rc,
Gc, Bc, Ac). They
are understood to have integer values between 0 and
(kR, kG, kB,
kA), where
kc=2mc-1
and (mR, mG, mB, mA) is the number of red, green, blue, and alpha bitplanes.
Source and destination scale factors are referred to as (sR, sG, sB, sA) and (dR, dG, dB, dA). The scale factors described in the table, denoted (fR, fG, fB, fA), represent either source or destination factors. All scale factors have range [0, 1].
| Parameter | (fR, fG, fB, fA) |
GL_ZERO | (0, 0, 0, 0) |
GL_ONE | (1, 1, 1, 1) |
GL_SRC_COLOR | (Rs/kR, Gs/kG, Bs/kB, As/kA) |
GL_ONE_MINUS_SRC_COLOR | (1, 1, 1, 1)-(Rs/kR, Gs/kG, Bs/kB, As/kA) |
GL_DST_COLOR | (Rd/kR, Gd/kG, Bd/kB, Ad/kA) |
GL_ONE_MINUS_DST_COLOR | (1, 1, 1, 1)-(Rd/kR, Gd/kG, Bd/kB, Ad/kA) |
GL_SRC_ALPHA | (As/kA, As/kA, As/kA, As/kA) |
GL_ONE_MINUS_SRC_ALPHA | (1, 1, 1, 1)-(As/kA, As/kA, As/kA, As/kA) |
GL_DST_ALPHA | (Ad/kA, Ad/kA, Ad/kA, Ad/kA) |
GL_ONE_MINUS_DST_ALPHA | (1, 1, 1, 1)-(Ad/kA, Ad/kA, Ad/kA, Ad/kA) |
GL_CONSTANT_COLOR | (Rc, Gc, Bc, Ac) |
GL_ONE_MINUS_CONSTANT_COLOR | (1, 1, 1, 1)-(Rc, Gc, Bc, Ac) |
GL_CONSTANT_ALPHA | (Ac, Ac, Ac, Ac) |
GL_ONE_MINUS_CONSTANT_ALPHA | (1, 1, 1, 1)-(Ac, Ac, Ac, Ac) |
GL_SRC_ALPHA_SATURATE | (i, i, i, 1) |
i=min(As, kA-Ad)/kA
To determine the blended RGBA values of a pixel when drawing in RGBA mode, the system uses the following equations:
Rd=min(kR, RssR+RddR) Gd=min(kG, GssG+GddG) Bd=min(kB, BssB+BddB) Ad=min(kA, AssA+AddA)
Despite the apparent precision of the above equations, blending
arithmetic is not exactly specified, because blending operates with
imprecise integer color values. However, a blend factor that should be
equal to 1 is guaranteed not to modify its multiplicand, and a blend
factor equal to 0 reduces its multiplicand to 0. For example, when
sfactor is GL_SRC_ALPHA, dfactor is
GL_ONE_MINUS_SRC_ALPHA, and As is equal to
kA, the equations reduce to simple replacement:
Rd=Rs Gd=Gs Bd=Bs Ad=As
sfactorSpecifies how the red, green, blue, and alpha source blending factors
are computed. The following symbolic constants are accepted:
GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR,
GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA,
GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA,
GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and
GL_SRC_ALPHA_SATURATE. The initial value is GL_ONE.
dfactorSpecifies how the red, green, blue, and alpha destination blending
factors are computed. The following symbolic constants are accepted:
GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR,
GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA,
GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA.
GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA. The initial
value is GL_ZERO.
Transparency is best implemented using blend function (
GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) with primitives sorted from farthest to nearest. Note that this transparency calculation does not require the presence of alpha bitplanes in the frame buffer.Blend function (
GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) is also useful for rendering antialiased points and lines in arbitrary order.Polygon antialiasing is optimized using blend function (
GL_SRC_ALPHA_SATURATE,GL_ONE) with polygons sorted from nearest to farthest. (See theglEnable,glDisablereference page and theGL_POLYGON_SMOOTHargument for information on polygon antialiasing.) Destination alpha bitplanes, which must be present for this blend function to operate correctly, store the accumulated coverage.
GL_INVALID_ENUM is generated if either sfactor or dfactor
is not an accepted value.
GL_INVALID_OPERATION is generated if glBlendFunc is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Incoming (source) alpha is correctly thought of as a material opacity, ranging from 1.0 (KA), representing complete opacity, to 0.0 (0), representing complete transparency.
When more than one color buffer is enabled for drawing, the GL
performs blending separately for each enabled buffer, using the
contents of that buffer for destination color. (See glDrawBuffer.)
Blending affects only RGBA rendering. It is ignored by color index renderers.
GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA are available
only if the GL version is 1.4 or greater or if the ARB_imaging
is supported by your implementation.
GL_SRC_COLOR and GL_ONE_MINUS_SRC_COLOR are valid only for
sfactor if the GL version is 1.4 or greater.
GL_DST_COLOR and GL_ONE_MINUS_DST_COLOR are valid only for
dfactor if the GL version is 1.4 or greater.
glAlphaFunc, glBlendColor, glBlendEquation,
glBlendFuncSeparate, glClear, glDrawBuffer, glEnable,
glLogicOp, glStencilFunc
void glCallList(int list)
glCallList causes the named display list to be executed. The
commands saved in the display list are executed in order, just as if
they were called without using a display list. If list has not
been defined as a display list, glCallList is ignored.
glCallList can appear inside a display list. To avoid the
possibility of infinite recursion resulting from display lists calling
one another, a limit is placed on the nesting level of display lists
during display-list execution. This limit is at least 64, and it
depends on the implementation.
GL state is not saved and restored across a call to glCallList.
Thus, changes made to GL state during the execution of a display list
remain after execution of the display list is completed. Use
glPushAttrib, glPopAttrib, glPushMatrix, and glPopMatrix
to preserve GL state across glCallList calls.
listSpecifies the integer name of the display list to be executed.
Display lists can be executed between a call to glBegin and the
corresponding call to glEnd, as long as the display list includes
only commands that are allowed in this interval.
glCallLists, glDeleteLists, glGenLists, glNewList,
glPushAttrib, glPushMatrix
void glCallLists(int ... lists)
glCallLists causes each display list in the list of names passed as
lists to be executed. As a result, the commands saved in each
display list are executed in order, just as if they were called
without using a display list. Names of display lists that have not
been defined are ignored.
glCallLists provides an efficient means for executing more than one
display list.
An additional level of indirection is made available with the
glListBase command, which specifies an unsigned offset that is
added to each display-list name specified in lists before that
display list is executed.
glCallLists can appear inside a display list. To avoid the
possibility of infinite recursion resulting from display lists calling
one another, a limit is placed on the nesting level of display lists
during display-list execution. This limit must be at least 64, and it
depends on the implementation.
GL state is not saved and restored across a call to glCallLists.
Thus, changes made to GL state during the execution of the display
lists remain after execution is completed. Use glPushAttrib,
glPopAttrib, glPushMatrix, and glPopMatrix to preserve GL
state across glCallLists calls.
listsSpecifies the address of an array of name offsets in the display list.
Display lists can be executed between a call to glBegin and the
corresponding call to glEnd, as long as the display list includes
only commands that are allowed in this interval.
glCallList, glDeleteLists, glGenLists, glListBase,
glNewList, glPushAttrib, glPushMatrix
void glClear(int mask)
glClear sets the bitplane area of the window to values previously
selected by glClearColor, glClearIndex, glClearDepth,
glClearStencil, and glClearAccum. Multiple color buffers can be
cleared simultaneously by selecting more than one buffer at a time
using glDrawBuffer.
The pixel ownership test, the scissor test, dithering, and the buffer
writemasks affect the operation of glClear. The scissor box bounds
the cleared region. Alpha function, blend function, logical operation,
stenciling, texture mapping, and depth-buffering are ignored by
glClear.
glClear takes a single argument that is the bitwise OR of several
values indicating which buffer is to be cleared.
The values are as follows:
GL_COLOR_BUFFER_BIT | Indicates the buffers currently enabled for color writing. |
GL_DEPTH_BUFFER_BIT | Indicates the depth buffer. |
GL_ACCUM_BUFFER_BIT | Indicates the accumulation buffer. |
GL_STENCIL_BUFFER_BIT | Indicates the stencil buffer. |
maskBitwise OR of masks that indicate the buffers to be cleared. The four
masks are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT,
GL_ACCUM_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT.
GL_INVALID_VALUE is generated if any bit other than the four
defined bits is set in mask.
GL_INVALID_OPERATION is generated if glClear is executed between
the execution of glBegin and the corresponding execution of
glEnd.
If a buffer is not present, then a glClear directed at that buffer
has no effect.
glClearAccum, glClearColor, glClearDepth, glClearIndex,
glClearStencil, glColorMask, glDepthMask, glDrawBuffer,
glScissor, glStencilMask
void glClearAccum(float|array(float) red, float|void green, float|void blue, float|void alpha)
glClearAccum specifies the red, green, blue, and alpha values used
by glClear to clear the accumulation buffer.
Values specified by glClearAccum are clamped to the range [-1, 1].
redgreenbluealphaSpecify the red, green, blue, and alpha values used when the accumulation buffer is cleared. The initial values are all 0.
GL_INVALID_OPERATION is generated if glClearAccum is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glAccum, glClear
void glClearColor(float|array(float) red, float|void green, float|void blue, float|void alpha)
glClearColor specifies the red, green, blue, and alpha values used
by glClear to clear the color buffers. Values specified by
glClearColor are clamped to the range [0, 1].
redgreenbluealphaSpecify the red, green, blue, and alpha values used when the color buffers are cleared. The initial values are all 0.
GL_INVALID_OPERATION is generated if glClearColor is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glClear
void glClearDepth(float depth)
glClearDepth specifies the depth value used by glClear to clear
the depth buffer. Values specified by glClearDepth are clamped to
the range [0, 1].
depthSpecifies the depth value used when the depth buffer is cleared. The initial value is 1.
GL_INVALID_OPERATION is generated if glClearDepth is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glClear
void glClearIndex(float c)
glClearIndex specifies the index used by glClear to clear the
color index buffers. c is not clamped. Rather, c is
converted to a fixed-point value with unspecified precision to the
right of the binary point. The integer part of this value is then
masked with
2m-1
, where m is the number of bits in a color index stored in the
frame buffer.
cSpecifies the index used when the color index buffers are cleared. The initial value is 0.
GL_INVALID_OPERATION is generated if glClearIndex is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glClear
void glClearStencil(int s)
glClearStencil specifies the index used by glClear to clear the
stencil buffer. s is masked with
2m-1
, where m is the number of bits in the stencil buffer.
sSpecifies the index used when the stencil buffer is cleared. The initial value is 0.
GL_INVALID_OPERATION is generated if glClearStencil is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glClear, glStencilFunc, glStencilFuncSeparate,
glStencilMask, glStencilMaskSeparate, glStencilOp,
glStencilOpSeparate
void glClipPlane(int plane, float|array(float) equation_0, float|void equation_1, float|void equation_2, float|void equation_3)
Geometry is always clipped against the boundaries of a six-plane
frustum in x, y, and z. glClipPlane allows the
specification of additional planes, not necessarily perpendicular to
the x, y, or z axis, against which all geometry is
clipped. To determine the maximum number of additional clipping
planes, call glGet with argument GL_MAX_CLIP_PLANES. All
implementations support at least six such clipping planes. Because the
resulting clipping region is the intersection of the defined
half-spaces, it is always convex.
glClipPlane specifies a half-space using a four-component plane
equation. When glClipPlane is called, equation is transformed
by the inverse of the modelview matrix and stored in the resulting eye
coordinates. Subsequent changes to the modelview matrix have no effect
on the stored plane-equation components. If the dot product of the eye
coordinates of a vertex with the stored plane equation components is
positive or zero, the vertex is in with respect to that clipping
plane. Otherwise, it is out.
To enable and disable clipping planes, call glEnable and
glDisable with the argument GL_CLIP_PLANEi, where i
is the plane number.
All clipping planes are initially defined as (0, 0, 0, 0) in eye coordinates and are disabled.
planeSpecifies which clipping plane is being positioned. Symbolic names of
the form GL_CLIP_PLANEi, where i is an integer between
0 and GL_MAX_CLIP_PLANES-1, are accepted.
equationSpecifies the address of an array of four double-precision floating-point values. These values are interpreted as a plane equation.
GL_INVALID_ENUM is generated if plane is not an accepted
value.
GL_INVALID_OPERATION is generated if glClipPlane is executed
between the execution of glBegin and the corresponding execution of
glEnd.
It is always the case that GL_CLIP_PLANEi =
GL_CLIP_PLANE0 + i.
glEnable
void glColor(float|int red, float|int green, float|int blue, float|int|void alpha)
void glColor(array(float|int) v)
The GL stores both a current single-valued color index and a current
four-valued RGBA color. glColor sets a new four-valued RGBA color.
If no alpha value has been given, 1.0 (full intensity) is implied.
Current color values are stored in floating-point format, with unspecified mantissa and exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point values such that the largest representable value maps to 1.0 (full intensity), and 0 maps to 0.0 (zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. (Note that this mapping does not convert 0 precisely to 0.0.) Floating-point values are mapped directly.
Neither floating-point nor signed integer values are clamped to the range [0, 1] before the current color is updated. However, color components are clamped to this range before they are interpolated or written into a color buffer.
redgreenblueSpecify new red, green, and blue values for the current color.
alphaSpecifies a new alpha value for the current color.
vSpecifies an array that contains red, green, blue, and (sometimes) alpha values.
The initial value for the current color is (1, 1, 1, 1).
The current color can be updated at any time. In particular,
glColor can be called between a call to glBegin and the
corresponding call to glEnd.
glColorPointer, glIndex, glSecondaryColor
void glColorMask(int red, int green, int blue, int alpha)
glColorMask specifies whether the individual color components in
the frame buffer can or cannot be written. If red is GL_FALSE,
for example, no change is made to the red component of any pixel in
any of the color buffers, regardless of the drawing operation
attempted.
Changes to individual bits of components cannot be controlled. Rather, changes are either enabled or disabled for entire color components.
redgreenbluealphaSpecify whether red, green, blue, and alpha can or cannot be written
into the frame buffer. The initial values are all GL_TRUE,
indicating that the color components can be written.
GL_INVALID_OPERATION is generated if glColorMask is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glClear, glColor, glColorPointer, glDepthMask, glIndex,
glIndexPointer, glIndexMask, glStencilMask
void glColorMaterial(int face, int mode)
glColorMaterial specifies which material parameters track the
current color. When GL_COLOR_MATERIAL is enabled, the material
parameter or parameters specified by mode, of the material or
materials specified by face, track the current color at all
times.
To enable and disable GL_COLOR_MATERIAL, call glEnable and
glDisable with argument GL_COLOR_MATERIAL. GL_COLOR_MATERIAL
is initially disabled.
faceSpecifies whether front, back, or both front and back material
parameters should track the current color. Accepted values are
GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK. The initial value
is GL_FRONT_AND_BACK.
modeSpecifies which of several material parameters track the current
color. Accepted values are GL_EMISSION, GL_AMBIENT,
GL_DIFFUSE, GL_SPECULAR, and GL_AMBIENT_AND_DIFFUSE. The
initial value is GL_AMBIENT_AND_DIFFUSE.
GL_INVALID_ENUM is generated if face or mode is not an
accepted value.
GL_INVALID_OPERATION is generated if glColorMaterial is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glColorMaterial makes it possible to change a subset of material
parameters for each vertex using only the glColor command, without
calling glMaterial. If only such a subset of parameters is to be
specified for each vertex, calling glColorMaterial is preferable to
calling glMaterial.
Call glColorMaterial before enabling GL_COLOR_MATERIAL.
Calling glDrawElements, glDrawArrays, or glDrawRangeElements
may leave the current color indeterminate, if the color array is
enabled. If glColorMaterial is enabled while the current color is
indeterminate, the lighting material state specified by face and
mode is also indeterminate.
If the GL version is 1.1 or greater, and GL_COLOR_MATERIAL is
enabled, evaluated color values affect the results of the lighting
equation as if the current color were being modified, but no change is
made to the tracking lighting parameter of the current color.
glColor, glColorPointer, glDrawArrays, glDrawElements,
glDrawRangeElements, glEnable, glLight, glLightModel,
glMaterial
void glColorPointer(int size, int type, int stride, System.Memory pointer)
glColorPointer specifies the location and data format of an array
of color components to use when rendering. size specifies the
number of components per color, and must be 3 or 4. type
specifies the data type of each color component, and stride
specifies the byte stride from one color to the next, allowing
vertices and attributes to be packed into a single array or stored in
separate arrays. (Single-array storage may be more efficient on some
implementations; see glInterleavedArrays.)
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while a color array is specified,
pointer is treated as a byte offset into the buffer object's data
store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
saved as color vertex array client-side state
(GL_COLOR_ARRAY_BUFFER_BINDING).
When a color array is specified, size, type, stride, and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the color array, call glEnableClientState and
glDisableClientState with the argument GL_COLOR_ARRAY. If
enabled, the color array is used when glDrawArrays,
glMultiDrawArrays, glDrawElements, glMultiDrawElements,
glDrawRangeElements, or glArrayElement is called.
sizeSpecifies the number of components per color. Must be 3 or 4. The initial value is 4.
typeSpecifies the data type of each color component in the array. Symbolic
constants GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT,
GL_UNSIGNED_SHORT, GL_INT, GL_UNSIGNED_INT, GL_FLOAT, and
GL_DOUBLE are accepted. The initial value is GL_FLOAT.
strideSpecifies the byte offset between consecutive colors. If stride is 0, the colors are understood to be tightly packed in the array. The initial value is 0.
pointerSpecifies a pointer to the first component of the first color element in the array. The initial value is 0.
GL_INVALID_VALUE is generated if size is not 3 or 4.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
glColorPointer is available only if the GL version is 1.1 or
greater.
The color array is initially disabled and isn't accessed when
glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glColorPointer is not allowed between the execution of
glBegin and the corresponding execution of glEnd, but an error
may or may not be generated. If no error is generated, the operation
is undefined.
glColorPointer is typically implemented on the client side.
Color array parameters are client-side state and are therefore not
saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glColor,
glDisableClientState, glDrawArrays, glDrawElements,
glDrawRangeElements, glEdgeFlagPointer, glEnableClientState,
glFogCoordPointer, glIndexPointer, glInterleavedArrays,
glMultiDrawArrays, glMultiDrawElements, glNormalPointer,
glPopClientAttrib, glPushClientAttrib,
glSecondaryColorPointer, glTexCoordPointer,
glVertexAttribPointer, glVertexPointer
void glCopyPixels(int x, int y, int width, int height, int type)
glCopyPixels copies a screen-aligned rectangle of pixels from the
specified frame buffer location to a region relative to the current
raster position. Its operation is well defined only if the entire
pixel source region is within the exposed portion of the window.
Results of copies from outside the window, or from regions of the
window that are not exposed, are hardware dependent and undefined.
x and y specify the window coordinates of the lower left corner of the rectangular region to be copied. width and height specify the dimensions of the rectangular region to be copied. Both width and height must not be negative.
Several parameters control the processing of the pixel data while it
is being copied. These parameters are set with three commands:
glPixelTransfer, glPixelMap, and glPixelZoom. This reference
page describes the effects on glCopyPixels of most, but not all, of
the parameters specified by these three commands.
glCopyPixels copies values from each pixel with the lower left-hand
corner at
(x+i, y+j)
for
0<=i<width
and
0<=j<height
. This pixel is said to be the ith pixel in the jth row.
Pixels are copied in row order from the lowest to the highest row,
left to right in each row.
type specifies whether color, depth, or stencil data is to be copied. The details of the transfer for each data type are as follows:
GL_COLOR | Indices or RGBA colors are read from the buffer currently
specified as the read source buffer (see If the GL is in RGBA
mode, the red, green, blue, and alpha components of each pixel that is
read are converted to an internal floating-point format with
unspecified precision. The conversion maps the largest representable
component value to 1.0, and component value 0 to 0.0. The resulting
floating-point color values are then multiplied by GL_c_SCALE and added to GL_c_BIAS, where c is
RED, GREEN, BLUE, and ALPHA for the respective color components. The
results are clamped to the range [0,1]. If If the ARB_imaging extension is supported, the color values may be additionally processed by color-table lookups, color-matrix transformations, and convolution filters. The GL then converts the resulting indices or RGBA colors to fragments by attaching the current raster position z coordinate and texture coordinates to each pixel, then assigning window coordinates (xr+i, yr+j), where (xr, yr) is the current raster position, and the pixel was the ith pixel in the jth row. These pixel fragments are then treated just like the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the fragment operations are applied before the fragments are written to the frame buffer. |
GL_DEPTH | Depth values are read from the depth buffer and converted
directly to an internal floating-point format with unspecified
precision. The resulting floating-point depth value is then multiplied
by The GL then converts the resulting depth components to fragments by attaching the current raster position color or color index and texture coordinates to each pixel, then assigning window coordinates (xr+i, yr+j), where (xr, yr) is the current raster position, and the pixel was the ith pixel in the jth row. These pixel fragments are then treated just like the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the fragment operations are applied before the fragments are written to the frame buffer. |
GL_STENCIL | Stencil indices are read from the stencil buffer and converted
to an internal fixed-point format with an unspecified number of bits
to the right of the binary point. Each fixed-point index is then
shifted left by |
glPixelZoom is used to change the x and
y pixel zoom factors, pixels are converted to fragments as
follows. If (xr, yr) is the current
raster position, and a given pixel is in the ith location in the
jth row of the source pixel rectangle, then fragments are
generated for pixels whose centers are in the rectangle with corners
at
(xr+zoomxi, yr+zoomyj)
and
(xr+zoomx(i+1), yr+zoomy(j+1))
where zoomx is the value of GL_ZOOM_X and
zoomy is the value of GL_ZOOM_Y.
xySpecify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
widthheightSpecify the dimensions of the rectangular region of pixels to be copied. Both must be nonnegative.
typeSpecifies whether color values, depth values, or stencil values are to
be copied. Symbolic constants GL_COLOR, GL_DEPTH, and
GL_STENCIL are accepted.
To copy the color pixel in the lower left corner of the window to the current raster position, use
glCopyPixels(0, 0, 1, 1, GL_COLOR);
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if either width or height
is negative.
GL_INVALID_OPERATION is generated if type is GL_DEPTH and
there is no depth buffer.
GL_INVALID_OPERATION is generated if type is GL_STENCIL and
there is no stencil buffer.
GL_INVALID_OPERATION is generated if glCopyPixels is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Modes specified by glPixelStore have no effect on the operation of
glCopyPixels.
glColorTable, glConvolutionFilter1D, glConvolutionFilter2D,
glDepthFunc, glDrawBuffer, glDrawPixels, glMatrixMode,
glPixelMap, glPixelTransfer, glPixelZoom, glRasterPos,
glReadBuffer, glReadPixels, glSeparableFilter2D,
glStencilFunc, glWindowPos
void glCopyTexImage1D(int target, int level, int internalformat, int x, int y, int width, int border)
glCopyTexImage1D defines a one-dimensional texture image with
pixels from the current GL_READ_BUFFER.
The screen-aligned pixel row with left corner at (x, y) and with a length of width+2(border) defines the texture array at the mipmap level specified by level. internalformat specifies the internal format of the texture array.
The pixels in the row are processed exactly as if glCopyPixels had
been called, but the process stops just before final conversion. At
this point all pixel component values are clamped to the range [0, 1]
and then converted to the texture's internal format for storage in the
texel array.
Pixel ordering is such that lower x screen coordinates correspond to lower texture coordinates.
If any of the pixels within the specified row of the current
GL_READ_BUFFER are outside the window associated with the current
rendering context, then the values obtained for those pixels are
undefined.
glCopyTexImage1D defines a one-dimensional texture image with
pixels from the current GL_READ_BUFFER.
When internalformat is one of the sRGB types, the GL does not
automatically convert the source pixels to the sRGB color space. In
this case, the glPixelMap function can be used to accomplish the
conversion.
targetSpecifies the target texture. Must be GL_TEXTURE_1D.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
internalformatSpecifies the internal format of the texture. Must be one of the
following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8,
GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA,
GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,
GL_COMPRESSED_INTENSITY, GL_COMPRESSED_RGB,
GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE,
GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,
GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4,
GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8,
GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12,
GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4,
GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_RGB,
GL_R3_G3_B2, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10,
GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4,
GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12,
GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8,
GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB,
GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8.
xySpecify the window coordinates of the left corner of the row of pixels to be copied.
widthSpecifies the width of the texture image. Must be 0 or 2n+2(border) for some integer n. The height of the texture image is 1.
borderSpecifies the width of the border. Must be either 0 or 1.
GL_INVALID_ENUM is generated if target is not one of the
allowable values.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2max
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if internalformat is not an
allowable value.
GL_INVALID_VALUE is generated if width is less than 0 or
greater than 2 + GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if non-power-of-two textures are not
supported and the width cannot be represented as
2n+2(border)
for some integer value of n.
GL_INVALID_VALUE is generated if border is not 0 or 1.
GL_INVALID_OPERATION is generated if glCopyTexImage1D is
executed between the execution of glBegin and the corresponding
execution of glEnd.
GL_INVALID_OPERATION is generated if internalformat is
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32 and there is no
depth buffer.
glCopyTexImage1D is available only if the GL version is 1.1 or
greater.
Texturing has no effect in color index mode.
1, 2, 3, and 4 are not accepted values for internalformat.
An image with 0 width indicates a NULL texture.
When the ARB_imaging extension is supported, the RGBA components
copied from the framebuffer may be processed by the imaging pipeline.
See glTexImage1D for specific details.
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, and GL_DEPTH_COMPONENT32 are available
only if the GL version is 1.4 or greater.
Non-power-of-two textures are supported if the GL version is 2.0 or
greater, or if the implementation exports the
GL_ARB_texture_non_power_of_two extension.
The GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, GL_SRGB8_ALPHA8,
GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, and
GL_SLUMINANCE8_ALPHA8 internal formats are only available if the GL
version is 2.1 or greater. See glTexImage1D for specific details
about sRGB conversion.
glCopyPixels, glCopyTexImage2D, glCopyTexSubImage1D,
glCopyTexSubImage2D, glPixelStore, glPixelTransfer,
glTexEnv, glTexGen, glTexImage1D, glTexImage2D,
glTexSubImage1D, glTexSubImage2D, glTexParameter
void glCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border)
glCopyTexImage2D defines a two-dimensional texture image, or
cube-map texture image with pixels from the current GL_READ_BUFFER.
The screen-aligned pixel rectangle with lower left corner at (x, y) and with a width of width+2(border) and a height of height+2(border) defines the texture array at the mipmap level specified by level. internalformat specifies the internal format of the texture array.
The pixels in the rectangle are processed exactly as if
glCopyPixels had been called, but the process stops just before
final conversion. At this point all pixel component values are clamped
to the range [0, 1] and then converted to the texture's internal
format for storage in the texel array.
Pixel ordering is such that lower x and y screen coordinates correspond to lower s and t texture coordinates.
If any of the pixels within the specified rectangle of the current
GL_READ_BUFFER are outside the window associated with the current
rendering context, then the values obtained for those pixels are
undefined.
When internalformat is one of the sRGB types, the GL does not
automatically convert the source pixels to the sRGB color space. In
this case, the glPixelMap function can be used to accomplish the
conversion.
targetSpecifies the target texture. Must be GL_TEXTURE_2D,
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
internalformatSpecifies the internal format of the texture. Must be one of the
following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8,
GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA,
GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,
GL_COMPRESSED_INTENSITY, GL_COMPRESSED_RGB,
GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE,
GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,
GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4,
GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8,
GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12,
GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4,
GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_RGB,
GL_R3_G3_B2, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10,
GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4,
GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12,
GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8,
GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB,
GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8.
xySpecify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
widthSpecifies the width of the texture image. Must be 0 or 2n+2(border) for some integer n.
heightSpecifies the height of the texture image. Must be 0 or 2m+2(border) for some integer m.
borderSpecifies the width of the border. Must be either 0 or 1.
GL_INVALID_ENUM is generated if target is not
GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2max
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if width is less than 0 or
greater than 2 + GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if non-power-of-two textures are not
supported and the width or depth cannot be represented as
2k+2(border)
for some integer k.
GL_INVALID_VALUE is generated if border is not 0 or 1.
GL_INVALID_VALUE is generated if internalformat is not an
accepted format.
GL_INVALID_OPERATION is generated if glCopyTexImage2D is
executed between the execution of glBegin and the corresponding
execution of glEnd.
GL_INVALID_OPERATION is generated if internalformat is
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32 and there is no
depth buffer.
glCopyTexImage2D is available only if the GL version is 1.1 or
greater.
Texturing has no effect in color index mode.
1, 2, 3, and 4 are not accepted values for internalformat.
An image with height or width of 0 indicates a NULL texture.
When the ARB_imaging extension is supported, the RGBA components
read from the framebuffer may be processed by the imaging pipeline.
See glTexImage1D for specific details.
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
or GL_PROXY_TEXTURE_CUBE_MAP are available only if the GL version
is 1.3 or greater.
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, and GL_DEPTH_COMPONENT32 are available
only if the GL version is 1.4 or greater.
The GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, GL_SRGB8_ALPHA8,
GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, and
GL_SLUMINANCE8_ALPHA8 internal formats are only available if the GL
version is 2.1 or greater. See glTexImage2D for specific details
about sRGB conversion.
glCopyPixels, glCopyTexImage1D, glCopyTexSubImage1D,
glCopyTexSubImage2D, glPixelStore, glPixelTransfer,
glTexEnv, glTexGen, glTexImage1D, glTexImage2D,
glTexSubImage1D, glTexSubImage2D, glTexParameter
void glCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width)
glCopyTexSubImage1D replaces a portion of a one-dimensional texture
image with pixels from the current GL_READ_BUFFER (rather than from
main memory, as is the case for glTexSubImage1D).
The screen-aligned pixel row with left corner at (x,\ y), and with length width replaces the portion of the texture array with x indices xoffset through xoffset+width-1 , inclusive. The destination in the texture array may not include any texels outside the texture array as it was originally specified.
The pixels in the row are processed exactly as if glCopyPixels had
been called, but the process stops just before final conversion. At
this point, all pixel component values are clamped to the range [0, 1]
and then converted to the texture's internal format for storage in the
texel array.
It is not an error to specify a subtexture with zero width, but such a
specification has no effect. If any of the pixels within the specified
row of the current GL_READ_BUFFER are outside the read window
associated with the current rendering context, then the values
obtained for those pixels are undefined.
No change is made to the internalformat, width, or border parameters of the specified texture array or to texel values outside the specified subregion.
targetSpecifies the target texture. Must be GL_TEXTURE_1D.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
xoffsetSpecifies the texel offset within the texture array.
xySpecify the window coordinates of the left corner of the row of pixels to be copied.
widthSpecifies the width of the texture subimage.
GL_INVALID_ENUM is generated if /target is not
GL_TEXTURE_1D.
GL_INVALID_OPERATION is generated if the texture array has not been
defined by a previous glTexImage1D or glCopyTexImage1D
operation.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if
level>log2(max)
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if
xoffset<-b
, or
(xoffset+width)>(w-b)
, where w is the GL_TEXTURE_WIDTH and b is the
GL_TEXTURE_BORDER of the texture image being modified. Note that
w includes twice the border width.
glCopyTexSubImage1D is available only if the GL version is 1.1 or
greater.
Texturing has no effect in color index mode.
glPixelStore and glPixelTransfer modes affect texture images in
exactly the way they affect glDrawPixels.
When the ARB_imaging extension is supported, the RGBA components
copied from the framebuffer may be processed by the imaging pipeline.
See glTexImage1D for specific details.
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage2D, glCopyTexSubImage3D, glPixelStore,
glPixelTransfer, glReadBuffer, glTexEnv, glTexGen,
glTexImage1D, glTexImage2D, glTexImage3D, glTexParameter,
glTexSubImage1D, glTexSubImage2D, glTexSubImage3D
void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height)
glCopyTexSubImage2D replaces a rectangular portion of a
two-dimensional texture image or cube-map texture image with pixels
from the current GL_READ_BUFFER (rather than from main memory, as
is the case for glTexSubImage2D).
The screen-aligned pixel rectangle with lower left corner at (x, y) and with width width and height height replaces the portion of the texture array with x indices xoffset through xoffset+width-1 , inclusive, and y indices yoffset through yoffset+height-1 , inclusive, at the mipmap level specified by level.
The pixels in the rectangle are processed exactly as if
glCopyPixels had been called, but the process stops just before
final conversion. At this point, all pixel component values are
clamped to the range [0, 1] and then converted to the texture's
internal format for storage in the texel array.
The destination rectangle in the texture array may not include any texels outside the texture array as it was originally specified. It is not an error to specify a subtexture with zero width or height, but such a specification has no effect.
If any of the pixels within the specified rectangle of the current
GL_READ_BUFFER are outside the read window associated with the
current rendering context, then the values obtained for those pixels
are undefined.
No change is made to the internalformat, width, height, or border parameters of the specified texture array or to texel values outside the specified subregion.
targetSpecifies the target texture. Must be GL_TEXTURE_2D,
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
xoffsetSpecifies a texel offset in the x direction within the texture array.
yoffsetSpecifies a texel offset in the y direction within the texture array.
xySpecify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
widthSpecifies the width of the texture subimage.
heightSpecifies the height of the texture subimage.
GL_INVALID_ENUM is generated if target is not
GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_OPERATION is generated if the texture array has not been
defined by a previous glTexImage2D or glCopyTexImage2D
operation.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if
level>log2(max)
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if
xoffset<-b
,
(xoffset+width)>(w-b)
,
yoffset<-b
, or
(yoffset+height)>(h-b)
, where w is the GL_TEXTURE_WIDTH, h is the
GL_TEXTURE_HEIGHT, and b is the GL_TEXTURE_BORDER of the
texture image being modified. Note that w and h include
twice the border width.
GL_INVALID_OPERATION is generated if glCopyTexSubImage2D is
executed between the execution of glBegin and the corresponding
execution of glEnd.
glCopyTexSubImage2D is available only if the GL version is 1.1 or
greater.
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
or GL_PROXY_TEXTURE_CUBE_MAP are available only if the GL version
is 1.3 or greater.
Texturing has no effect in color index mode.
glPixelStore and glPixelTransfer modes affect texture images in
exactly the way they affect glDrawPixels.
When the ARB_imaging extension is supported, the RGBA components
read from the framebuffer may be processed by the imaging pipeline.
See glTexImage1D for specific details.
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage3D, glPixelStore,
glPixelTransfer, glReadBuffer, glTexEnv, glTexGen,
glTexImage1D, glTexImage2D, glTexImage3D, glTexParameter,
glTexSubImage1D, glTexSubImage2D, glTexSubImage3D
void glCullFace(int mode)
glCullFace specifies whether front- or back-facing facets are
culled (as specified by mode) when facet culling is enabled.
Facet culling is initially disabled. To enable and disable facet
culling, call the glEnable and glDisable commands with the
argument GL_CULL_FACE. Facets include triangles, quadrilaterals,
polygons, and rectangles.
glFrontFace specifies which of the clockwise and counterclockwise
facets are front-facing and back-facing. See glFrontFace.
modeSpecifies whether front- or back-facing facets are candidates for
culling. Symbolic constants GL_FRONT, GL_BACK, and
GL_FRONT_AND_BACK are accepted. The initial value is GL_BACK.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glCullFace is executed
between the execution of glBegin and the corresponding execution of
glEnd.
If mode is GL_FRONT_AND_BACK, no facets are drawn, but other
primitives such as points and lines are drawn.
glEnable, glFrontFace
void glDeleteLists(int list, int range)
glDeleteLists causes a contiguous group of display lists to be
deleted. list is the name of the first display list to be
deleted, and range is the number of display lists to delete. All
display lists d with
list<=d<=list+range-1
are deleted.
All storage locations allocated to the specified display lists are freed, and the names are available for reuse at a later time. Names within the range that do not have an associated display list are ignored. If range is 0, nothing happens.
listSpecifies the integer name of the first display list to delete.
rangeSpecifies the number of display lists to delete.
GL_INVALID_VALUE is generated if range is negative.
GL_INVALID_OPERATION is generated if glDeleteLists is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCallList, glCallLists, glGenLists, glIsList,
glNewList
void glDeleteTextures(int ... textures)
glDeleteTextures deletes n textures named by the elements of
the array textures. After a texture is deleted, it has no
contents or dimensionality, and its name is free for reuse (for
example by glGenTextures). If a texture that is currently bound is
deleted, the binding reverts to 0 (the default texture).
glDeleteTextures silently ignores 0's and names that do not
correspond to existing textures.
texturesSpecifies the textures to be deleted.
GL_INVALID_OPERATION is generated if glDeleteTextures is
executed between the execution of glBegin and the corresponding
execution of glEnd.
glDeleteTextures is available only if the GL version is 1.1 or
greater.
glAreTexturesResident, glBindTexture, glCopyTexImage1D,
glCopyTexImage2D, glGenTextures, glGet, glGetTexParameter,
glPrioritizeTextures, glTexImage1D, glTexImage2D,
glTexParameter
void glDepthFunc(int func)
glDepthFunc specifies the function used to compare each incoming
pixel depth value with the depth value present in the depth buffer.
The comparison is performed only if depth testing is enabled. (See
glEnable and glDisable of GL_DEPTH_TEST.)
func specifies the conditions under which the pixel will be drawn. The comparison functions are as follows:
GL_NEVER | Never passes. |
GL_LESS | Passes if the incoming depth value is less than the stored depth value. |
GL_EQUAL | Passes if the incoming depth value is equal to the stored depth value. |
GL_LEQUAL | Passes if the incoming depth value is less than or equal to the stored depth value. |
GL_GREATER | Passes if the incoming depth value is greater than the stored depth value. |
GL_NOTEQUAL | Passes if the incoming depth value is not equal to the stored depth value. |
GL_GEQUAL | Passes if the incoming depth value is greater than or equal to the stored depth value. |
GL_ALWAYS | Always passes. |
GL_LESS. Initially,
depth testing is disabled. If depth testing is disabled or if no depth
buffer exists, it is as if the depth test always passes.
funcSpecifies the depth comparison function. Symbolic constants
GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER,
GL_NOTEQUAL, GL_GEQUAL, and GL_ALWAYS are accepted. The
initial value is GL_LESS.
GL_INVALID_ENUM is generated if func is not an accepted value.
GL_INVALID_OPERATION is generated if glDepthFunc is executed
between the execution of glBegin and the corresponding execution of
glEnd.
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.
glDepthRange, glEnable, glPolygonOffset
void glDepthMask(int flag)
glDepthMask specifies whether the depth buffer is enabled for
writing. If flag is GL_FALSE, depth buffer writing is
disabled. Otherwise, it is enabled. Initially, depth buffer writing is
enabled.
flagSpecifies whether the depth buffer is enabled for writing. If
flag is GL_FALSE, depth buffer writing is disabled. Otherwise,
it is enabled. Initially, depth buffer writing is enabled.
GL_INVALID_OPERATION is generated if glDepthMask is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glColorMask, glDepthFunc, glDepthRange, glIndexMask,
glStencilMask
void glDepthRange(float nearVal, float farVal)
After clipping and division by w, depth coordinates range from -1
to 1, corresponding to the near and far clipping planes.
glDepthRange specifies a linear mapping of the normalized depth
coordinates in this range to window depth coordinates. Regardless of
the actual depth buffer implementation, window coordinate depth values
are treated as though they range from 0 through 1 (like color
components). Thus, the values accepted by glDepthRange are both
clamped to this range before they are accepted.
The setting of (0,1) maps the near plane to 0 and the far plane to 1. With this mapping, the depth buffer range is fully utilized.
nearValSpecifies the mapping of the near clipping plane to window coordinates. The initial value is 0.
farValSpecifies the mapping of the far clipping plane to window coordinates. The initial value is 1.
GL_INVALID_OPERATION is generated if glDepthRange is executed
between the execution of glBegin and the corresponding execution of
glEnd.
It is not necessary that nearVal be less than farVal. Reverse mappings such as nearVal=1 , and farVal=0 are acceptable.
glDepthFunc, glPolygonOffset, glViewport
void glEnable(int cap)
void glDisable(int cap)
glEnable and glDisable enable and disable various capabilities.
Use glIsEnabled or glGet to determine the current setting of any
capability. The initial value for each capability with the exception
of GL_DITHER and GL_MULTISAMPLE is GL_FALSE. The initial
value for GL_DITHER and GL_MULTISAMPLE is GL_TRUE.
Both glEnable and glDisable take a single argument, cap,
which can assume one of the following values:
GL_ALPHA_TEST | If enabled, do alpha testing. See |
GL_AUTO_NORMAL | If enabled, generate normal vectors when either |
GL_BLEND | If enabled, blend the computed fragment color values with
the values in the color buffers. See |
| GL_CLIP_PLANEi | If enabled, clip geometry against user-defined clipping
plane i. See |
GL_COLOR_LOGIC_OP | If enabled, apply the currently selected logical
operation to the computed fragment color and color buffer values. See
|
GL_COLOR_MATERIAL | If enabled, have one or more material parameters track
the current color. See |
GL_COLOR_SUM | If enabled and no fragment shader is active, add the
secondary color value to the computed fragment color. See |
GL_COLOR_TABLE | If enabled, perform a color table lookup on the incoming
RGBA color values. See |
GL_CONVOLUTION_1D | If enabled, perform a 1D convolution operation on
incoming RGBA color values. See |
GL_CONVOLUTION_2D | If enabled, perform a 2D convolution operation on
incoming RGBA color values. See |
GL_CULL_FACE | If enabled, cull polygons based on their winding in
window coordinates. See |
GL_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 |
GL_DITHER | If enabled, dither color components or indices before they are written to the color buffer. |
GL_FOG | If enabled and no fragment shader is active, blend a fog
color into the post-texturing color. See |
GL_HISTOGRAM | If enabled, histogram incoming RGBA color values. See
|
GL_INDEX_LOGIC_OP | If enabled, apply the currently selected logical
operation to the incoming index and color buffer indices. See |
| GL_LIGHTi | If enabled, include light i in the evaluation of
the lighting equation. See |
GL_LIGHTING | If enabled and no vertex shader is active, use the
current lighting parameters to compute the vertex color or index.
Otherwise, simply associate the current color or index with each
vertex. See |
GL_LINE_SMOOTH | If enabled, draw lines with correct filtering. Otherwise,
draw aliased lines. See |
GL_LINE_STIPPLE | If enabled, use the current line stipple pattern when
drawing lines. See |
GL_MAP1_COLOR_4 | If enabled, calls to |
GL_MAP1_INDEX | If enabled, calls to |
GL_MAP1_NORMAL | If enabled, calls to |
GL_MAP1_TEXTURE_COORD_1 | If enabled, calls to |
GL_MAP1_TEXTURE_COORD_2 | If enabled, calls to |
GL_MAP1_TEXTURE_COORD_3 | If enabled, calls to |
GL_MAP1_TEXTURE_COORD_4 | If enabled, calls to |
GL_MAP1_VERTEX_3 | If enabled, calls to |
GL_MAP1_VERTEX_4 | If enabled, calls to |
GL_MAP2_COLOR_4 | If enabled, calls to |
GL_MAP2_INDEX | If enabled, calls to |
GL_MAP2_NORMAL | If enabled, calls to |
GL_MAP2_TEXTURE_COORD_1 | If enabled, calls to |
GL_MAP2_TEXTURE_COORD_2 | If enabled, calls to |
GL_MAP2_TEXTURE_COORD_3 | If enabled, calls to |
GL_MAP2_TEXTURE_COORD_4 | If enabled, calls to |
GL_MAP2_VERTEX_3 | If enabled, calls to |
GL_MAP2_VERTEX_4 | If enabled, calls to |
GL_MINMAX | If enabled, compute the minimum and maximum values of
incoming RGBA color values. See |
GL_MULTISAMPLE | If enabled, use multiple fragment samples in computing
the final color of a pixel. See |
GL_NORMALIZE | If enabled and no vertex shader is active, normal vectors
are normalized to unit length after transformation and before
lighting. This method is generally less efficient than |
GL_POINT_SMOOTH | If enabled, draw points with proper filtering. Otherwise,
draw aliased points. See |
GL_POINT_SPRITE | If enabled, calculate texture coordinates for points based on texture environment and point parameter settings. Otherwise texture coordinates are constant across points. |
GL_POLYGON_OFFSET_FILL | If enabled, and if the polygon is rendered in |
GL_POLYGON_OFFSET_LINE | If enabled, and if the polygon is rendered in |
GL_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 |
GL_POLYGON_SMOOTH | If enabled, draw polygons with proper filtering. Otherwise, draw aliased polygons. For correct antialiased polygons, an alpha buffer is needed and the polygons must be sorted front to back. |
GL_POLYGON_STIPPLE | If enabled, use the current polygon stipple pattern when
rendering polygons. See |
GL_POST_COLOR_MATRIX_COLOR_TABLE | If enabled, perform a color table lookup on RGBA color
values after color matrix transformation. See |
GL_POST_CONVOLUTION_COLOR_TABLE | If enabled, perform a color table lookup on RGBA color
values after convolution. See |
GL_RESCALE_NORMAL | If enabled and no vertex shader is active, normal vectors
are scaled after transformation and before lighting by a factor
computed from the modelview matrix. If the modelview matrix scales
space uniformly, this has the effect of restoring the transformed
normal to unit length. This method is generally more efficient than
|
GL_SAMPLE_ALPHA_TO_COVERAGE | If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the corresponding sample location. The temporary coverage value is then ANDed with the fragment coverage value. |
GL_SAMPLE_ALPHA_TO_ONE | If enabled, each sample alpha value is replaced by the maximum representable alpha value. |
GL_SAMPLE_COVERAGE | If enabled, the fragment's coverage is ANDed with the
temporary coverage value. If |
GL_SEPARABLE_2D | If enabled, perform a two-dimensional convolution
operation using a separable convolution filter on incoming RGBA color
values. See |
GL_SCISSOR_TEST | If enabled, discard fragments that are outside the
scissor rectangle. See |
GL_STENCIL_TEST | If enabled, do stencil testing and update the stencil
buffer. See |
GL_TEXTURE_1D | If enabled and no fragment shader is active,
one-dimensional texturing is performed (unless two- or
three-dimensional or cube-mapped texturing is also enabled). See |
GL_TEXTURE_2D | If enabled and no fragment shader is active,
two-dimensional texturing is performed (unless three-dimensional or
cube-mapped texturing is also enabled). See |
GL_TEXTURE_3D | If enabled and no fragment shader is active,
three-dimensional texturing is performed (unless cube-mapped texturing
is also enabled). See |
GL_TEXTURE_CUBE_MAP | If enabled and no fragment shader is active, cube-mapped
texturing is performed. See |
GL_TEXTURE_GEN_Q | If enabled and no vertex shader is active, the q
texture coordinate is computed using the texture generation function
defined with |
GL_TEXTURE_GEN_R | If enabled and no vertex shader is active, the r
texture coordinate is computed using the texture generation function
defined with |
GL_TEXTURE_GEN_S | If enabled and no vertex shader is active, the s
texture coordinate is computed using the texture generation function
defined with |
GL_TEXTURE_GEN_T | If enabled and no vertex shader is active, the t
texture coordinate is computed using the texture generation function
defined with |
GL_VERTEX_PROGRAM_POINT_SIZE | If enabled and a vertex shader is active, then the derived point size is taken from the (potentially clipped) shader builtin gl_PointSize and clamped to the implementation-dependent point size range. |
GL_VERTEX_PROGRAM_TWO_SIDE | If enabled and a vertex shader is active, it specifies that the GL will choose between front and back colors based on the polygon's face direction of which the vertex being shaded is a part. It has no effect on points or lines. |
capSpecifies a symbolic constant indicating a GL capability.
capSpecifies a symbolic constant indicating a GL capability.
GL_INVALID_ENUM is generated if cap is not one of the values
listed previously.
GL_INVALID_OPERATION is generated if glEnable or glDisable is
executed between the execution of glBegin and the corresponding
execution of glEnd.
GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE,
GL_POLYGON_OFFSET_POINT, GL_COLOR_LOGIC_OP, and
GL_INDEX_LOGIC_OP are available only if the GL version is 1.1 or
greater.
GL_RESCALE_NORMAL, and GL_TEXTURE_3D are available only if the
GL version is 1.2 or greater.
GL_MULTISAMPLE, GL_SAMPLE_ALPHA_TO_COVERAGE,
GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE,
GL_TEXTURE_CUBE_MAP are available only if the GL version is 1.3 or
greater.
GL_POINT_SPRITE, GL_VERTEX_PROGRAM_POINT_SIZE, and
GL_VERTEX_PROGRAM_TWO_SIDE is available only if the GL version is
2.0 or greater.
GL_COLOR_TABLE, GL_CONVOLUTION_1D, GL_CONVOLUTION_2D,
GL_HISTOGRAM, GL_MINMAX, GL_POST_COLOR_MATRIX_COLOR_TABLE,
GL_POST_CONVOLUTION_COLOR_TABLE, and GL_SEPARABLE_2D are
available only if ARB_imaging is returned from glGet with an
argument of GL_EXTENSIONS.
For OpenGL versions 1.3 and greater, or when ARB_multitexture is
supported, GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, and
GL_TEXTURE_GEN_Q enable or disable the respective state for the
active texture unit specified with glActiveTexture.
glActiveTexture, glAlphaFunc, glBlendFunc, glClipPlane,
glColorMaterial, glCullFace, glDepthFunc, glDepthRange,
glEnableClientState, glFog, glGet, glIsEnabled,
glLight, glLightModel, glLineWidth, glLineStipple,
glLogicOp, glMap1, glMap2, glMaterial, glNormal,
glNormalPointer, glPointSize, glPolygonMode,
glPolygonOffset, glPolygonStipple, glSampleCoverage,
glScissor, glStencilFunc, glStencilOp, glTexGen,
glTexImage1D, glTexImage2D, glTexImage3D
void glEnableClientState(int cap)
void glDisableClientState(int cap)
glEnableClientState and glDisableClientState enable or disable
individual client-side capabilities. By default, all client-side
capabilities are disabled. Both glEnableClientState and
glDisableClientState take a single argument, cap, which can
assume one of the following values:
GL_COLOR_ARRAY | If enabled, the color array is enabled for writing and used
during rendering when |
GL_EDGE_FLAG_ARRAY | If enabled, the edge flag array is enabled for writing and used
during rendering when |
GL_FOG_COORD_ARRAY | If enabled, the fog coordinate array is enabled for writing and
used during rendering when |
GL_INDEX_ARRAY | If enabled, the index array is enabled for writing and used
during rendering when |
GL_NORMAL_ARRAY | If enabled, the normal array is enabled for writing and used
during rendering when |
GL_SECONDARY_COLOR_ARRAY | If enabled, the secondary color array is enabled for writing and
used during rendering when |
GL_TEXTURE_COORD_ARRAY | If enabled, the texture coordinate array is enabled for writing
and used during rendering when |
GL_VERTEX_ARRAY | If enabled, the vertex array is enabled for writing and used
during rendering when |
capSpecifies the capability to enable. Symbolic constants
GL_COLOR_ARRAY, GL_EDGE_FLAG_ARRAY, GL_FOG_COORD_ARRAY,
GL_INDEX_ARRAY, GL_NORMAL_ARRAY, GL_SECONDARY_COLOR_ARRAY,
GL_TEXTURE_COORD_ARRAY, and GL_VERTEX_ARRAY are accepted.
capSpecifies the capability to disable.
GL_INVALID_ENUM is generated if cap is not an accepted value.
glEnableClientState is not allowed between the execution of
glBegin and the corresponding glEnd, but an error may or may not
be generated. If no error is generated, the behavior is undefined.
glEnableClientState is available only if the GL version is 1.1 or
greater.
GL_FOG_COORD_ARRAY and GL_SECONDARY_COLOR_ARRAY are available
only if the GL version is 1.4 or greater.
For OpenGL versions 1.3 and greater, or when ARB_multitexture is
supported, enabling and disabling GL_TEXTURE_COORD_ARRAY affects
the active client texture unit. The active client texture unit is
controlled with glClientActiveTexture.
glArrayElement, glClientActiveTexture, glColorPointer,
glDrawArrays, glDrawElements, glEdgeFlagPointer,
glFogCoordPointer, glEnable, glGetPointerv,
glIndexPointer, glInterleavedArrays, glNormalPointer,
glSecondaryColorPointer, glTexCoordPointer, glVertexPointer
void glDrawArrays(int mode, int first, int count)
glDrawArrays specifies multiple geometric primitives with very few
subroutine calls. Instead of calling a GL procedure to pass each
individual vertex, normal, texture coordinate, edge flag, or color,
you can prespecify separate arrays of vertices, normals, and colors
and use them to construct a sequence of primitives with a single call
to glDrawArrays.
When glDrawArrays is called, it uses count sequential elements
from each enabled array to construct a sequence of geometric
primitives, beginning with element first. mode specifies
what kind of primitives are constructed and how the array elements
construct those primitives. If GL_VERTEX_ARRAY is not enabled, no
geometric primitives are generated.
Vertex attributes that are modified by glDrawArrays have an
unspecified value after glDrawArrays returns. For example, if
GL_COLOR_ARRAY is enabled, the value of the current color is
undefined after glDrawArrays executes. Attributes that aren't
modified remain well defined.
modeSpecifies what kind of primitives to render. Symbolic constants
GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES,
GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted.
firstSpecifies the starting index in the enabled arrays.
countSpecifies the number of indices to be rendered.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_VALUE is generated if count is negative.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to an enabled array and the buffer object's data store is
currently mapped.
GL_INVALID_OPERATION is generated if glDrawArrays is executed
between the execution of glBegin and the corresponding glEnd.
glDrawArrays is available only if the GL version is 1.1 or greater.
glDrawArrays is included in display lists. If glDrawArrays is
entered into a display list, the necessary array data (determined by
the array pointers and enables) is also entered into the display list.
Because the array pointers and enables are client-side state, their
values affect display lists when the lists are created, not when the
lists are executed.
glArrayElement, glColorPointer, glDrawElements,
glDrawRangeElements, glEdgeFlagPointer, glFogCoordPointer,
glGetPointerv, glIndexPointer, glInterleavedArrays,
glNormalPointer, glSecondaryColorPointer, glTexCoordPointer,
glVertexPointer
void glDrawBuffer(int mode)
When colors are written to the frame buffer, they are written into the
color buffers specified by glDrawBuffer. The specifications are as
follows:
GL_NONE | No color buffers are written. |
GL_FRONT_LEFT | Only the front left color buffer is written. |
GL_FRONT_RIGHT | Only the front right color buffer is written. |
GL_BACK_LEFT | Only the back left color buffer is written. |
GL_BACK_RIGHT | Only the back right color buffer is written. |
GL_FRONT | Only the front left and front right color buffers are written. If there is no front right color buffer, only the front left color buffer is written. |
GL_BACK | Only the back left and back right color buffers are written. If there is no back right color buffer, only the back left color buffer is written. |
GL_LEFT | Only the front left and back left color buffers are written. If there is no back left color buffer, only the front left color buffer is written. |
GL_RIGHT | Only the front right and back right color buffers are written. If there is no back right color buffer, only the front right color buffer is written. |
GL_FRONT_AND_BACK | All the front and back color buffers (front left, front right, back left, back right) are written. If there are no back color buffers, only the front left and front right color buffers are written. If there are no right color buffers, only the front left and back left color buffers are written. If there are no right or back color buffers, only the front left color buffer is written. |
GL_AUX0 through GL_AUX3i | Only auxiliary color buffer i is written. |
Monoscopic contexts include only left buffers, and stereoscopic contexts include both left and right buffers. Likewise, single-buffered contexts include only front buffers, and double-buffered contexts include both front and back buffers. The context is selected at GL initialization.
modeSpecifies up to four color buffers to be drawn into. Symbolic
constants GL_NONE, GL_FRONT_LEFT, GL_FRONT_RIGHT,
GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT, GL_BACK,
GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK, and GL_AUX0 through
GL_AUX3i, where i is between 0 and the value of
GL_AUX_BUFFERS minus 1, are accepted. (GL_AUX_BUFFERS is not the
upper limit; use glGet to query the number of available aux
buffers.) The initial value is GL_FRONT for single-buffered
contexts, and GL_BACK for double-buffered contexts.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if none of the buffers indicated
by mode exists.
GL_INVALID_OPERATION is generated if glDrawBuffer is executed
between the execution of glBegin and the corresponding execution of
glEnd.
It is always the case that GL_AUX0 through GL_AUX3i =
GL_AUX0 + i.
glBlendFunc, glColorMask, glIndexMask, glLogicOp,
glReadBuffer
void glDrawElements(int mode, array(int) indices)
glDrawElements specifies multiple geometric primitives with very
few subroutine calls. Instead of calling a GL function to pass each
individual vertex, normal, texture coordinate, edge flag, or color,
you can prespecify separate arrays of vertices, normals, and so on,
and use them to construct a sequence of primitives with a single call
to glDrawElements.
When glDrawElements is called, it uses sequential elements from an
enabled array indices to construct a sequence of geometric
primitives. mode specifies what kind of primitives are
constructed and how the array elements construct these primitives. If
more than one array is enabled, each is used. If GL_VERTEX_ARRAY is
not enabled, no geometric primitives are constructed.
Vertex attributes that are modified by glDrawElements have an
unspecified value after glDrawElements returns. For example, if
GL_COLOR_ARRAY is enabled, the value of the current color is
undefined after glDrawElements executes. Attributes that aren't
modified maintain their previous values.
modeSpecifies what kind of primitives to render. Symbolic constants
GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES,
GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted.
indicesSpecifies an array of indices.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to an enabled array or the element array and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if glDrawElements is executed
between the execution of glBegin and the corresponding glEnd.
glDrawElements is available only if the GL version is 1.1 or
greater.
glDrawElements is included in display lists. If glDrawElements
is entered into a display list, the necessary array data (determined
by the array pointers and enables) is also entered into the display
list. Because the array pointers and enables are client-side state,
their values affect display lists when the lists are created, not when
the lists are executed.
glArrayElement, glColorPointer, glDrawArrays,
glDrawRangeElements, glEdgeFlagPointer, glFogCoordPointer,
glGetPointerv, glIndexPointer, glInterleavedArrays,
glNormalPointer, glSecondaryColorPointer, glTexCoordPointer,
glVertexPointer
void glDrawPixels(object|mapping(string:object) width, object|mapping(string:object) height, object|mapping(string:object) format, object|mapping(string:object) type, object|mapping(string:object) data)
glDrawPixels reads pixel data from memory and writes it into the
frame buffer relative to the current raster position, provided that
the raster position is valid. Use glRasterPos or glWindowPos to
set the current raster position; use glGet with argument
GL_CURRENT_RASTER_POSITION_VALID to determine if the specified
raster position is valid, and glGet with argument
GL_CURRENT_RASTER_POSITION to query the raster position.
Several parameters define the encoding of pixel data in memory and
control the processing of the pixel data before it is placed in the
frame buffer. These parameters are set with four commands:
glPixelStore, glPixelTransfer, glPixelMap, and
glPixelZoom. This reference page describes the effects on
glDrawPixels of many, but not all, of the parameters specified by
these four commands.
Data is read from data as a sequence of signed or unsigned bytes,
signed or unsigned shorts, signed or unsigned integers, or
single-precision floating-point values, depending on type. When
type is one of GL_UNSIGNED_BYTE, GL_BYTE,
GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT, or
GL_FLOAT each of these bytes, shorts, integers, or floating-point
values is interpreted as one color or depth component, or one index,
depending on format. When type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_INT_8_8_8_8, or GL_UNSIGNED_INT_10_10_10_2, each
unsigned value is interpreted as containing all the components for a
single pixel, with the color components arranged according to
format. When type is one of GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8_REV, or
GL_UNSIGNED_INT_2_10_10_10_REV, each unsigned value is interpreted
as containing all color components, specified by format, for a
single pixel in a reversed order. Indices are always treated
individually. Color components are treated as groups of one, two,
three, or four values, again based on format. Both individual
indices and groups of components are referred to as pixels. If
type is GL_BITMAP, the data must be unsigned bytes, and
format must be either GL_COLOR_INDEX or GL_STENCIL_INDEX.
Each unsigned byte is treated as eight 1-bit pixels, with bit ordering
determined by GL_UNPACK_LSB_FIRST (see glPixelStore).
width×height
pixels are read from memory, starting at location data. By
default, these pixels are taken from adjacent memory locations, except
that after all width pixels are read, the read pointer is
advanced to the next four-byte boundary. The four-byte row alignment
is specified by glPixelStore with argument GL_UNPACK_ALIGNMENT,
and it can be set to one, two, four, or eight bytes. Other pixel store
parameters specify different read pointer advancements, both before
the first pixel is read and after all width pixels are read. See
the glPixelStore reference page for details on these options.
If a non-zero named buffer object is bound to the
GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer) while a block
of pixels is specified, data is treated as a byte offset into the
buffer object's data store.
The
width×height
pixels that are read from memory are each operated on in the same way,
based on the values of several parameters specified by
glPixelTransfer and glPixelMap. The details of these operations,
as well as the target buffer into which the pixels are drawn, are
specific to the format of the pixels, as specified by format.
format can assume one of 13 symbolic values:
GL_COLOR_INDEX | Each pixel is a single value, a color index. It is converted to fixed-point format, with an unspecified number of bits to the right of the binary point, regardless of the memory data type. Floating-point values convert to true fixed-point values. Signed and unsigned integer data is converted with all fraction bits set to 0. Bitmap data convert to either 0 or 1. Each fixed-point index is then shifted left
by If the GL is in RGBA
mode, the resulting index is converted to an RGBA pixel with the help
of the The GL then converts the resulting indices or RGBA colors to fragments by attaching the current raster position z coordinate and texture coordinates to each pixel, then assigning x and y window coordinates to the nth fragment such that xn=xr+n%width yn=yr+⌊n/width⌋ where (xr, yr) is the current raster position. These pixel fragments are then treated just like the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the fragment operations are applied before the fragments are written to the frame buffer. |
GL_STENCIL_INDEX | Each pixel is a single value, a stencil index. It is converted to fixed-point format, with an unspecified number of bits to the right of the binary point, regardless of the memory data type. Floating-point values convert to true fixed-point values. Signed and unsigned integer data is converted with all fraction bits set to 0. Bitmap data convert to either 0 or 1. Each fixed-point index is
then shifted left by xn=xr+n%width yn=yr+⌊n/width⌋ where (xr, yr) is the current raster position. Only the pixel ownership test, the scissor test, and the stencil writemask affect these write operations. |
GL_DEPTH_COMPONENT | Each pixel is a single-depth component. Floating-point data is
converted directly to an internal floating-point format with
unspecified precision. Signed integer data is mapped linearly to the
internal floating-point format such that the most positive
representable integer value maps to 1.0, and the most negative
representable value maps to -1.0. Unsigned integer data is mapped
similarly: the largest integer value maps to 1.0, and 0 maps to 0.0.
The resulting floating-point depth value is then multiplied by The GL then converts the resulting depth components to fragments by attaching the current raster position color or color index and texture coordinates to each pixel, then assigning x and y window coordinates to the nth fragment such that xn=xr+n%width yn=yr+⌊n/width⌋ where (xr, yr) is the current raster position. These pixel fragments are then treated just like the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the fragment operations are applied before the fragments are written to the frame buffer. |
GL_RGBA | |
GL_BGRA | Each pixel is a four-component group: For If The GL then converts the resulting RGBA colors to fragments by attaching the current raster position z coordinate and texture coordinates to each pixel, then assigning x and y window coordinates to the nth fragment such that xn=xr+n%width yn=yr+⌊n/width⌋ where (xr, yr) is the current raster position. These pixel fragments are then treated just like the fragments generated by rasterizing points, lines, or polygons. Texture mapping, fog, and all the fragment operations are applied before the fragments are written to the frame buffer. |
GL_RED | Each pixel is a single red component. This component is converted to the internal floating-point format in the same way the red component of an RGBA pixel is. It is then converted to an RGBA pixel with green and blue set to 0, and alpha set to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
GL_GREEN | Each pixel is a single green component. This component is converted to the internal floating-point format in the same way the green component of an RGBA pixel is. It is then converted to an RGBA pixel with red and blue set to 0, and alpha set to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
GL_BLUE | Each pixel is a single blue component. This component is converted to the internal floating-point format in the same way the blue component of an RGBA pixel is. It is then converted to an RGBA pixel with red and green set to 0, and alpha set to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
GL_ALPHA | Each pixel is a single alpha component. This component is converted to the internal floating-point format in the same way the alpha component of an RGBA pixel is. It is then converted to an RGBA pixel with red, green, and blue set to 0. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
GL_RGB | |
GL_BGR | Each pixel is a three-component group: red first, followed by
green, followed by blue; for |
GL_LUMINANCE | Each pixel is a single luminance component. This component is converted to the internal floating-point format in the same way the red component of an RGBA pixel is. It is then converted to an RGBA pixel with red, green, and blue set to the converted luminance value, and alpha set to 1. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
GL_LUMINANCE_ALPHA | Each pixel is a two-component group: luminance first, followed by alpha. The two components are converted to the internal floating-point format in the same way the red component of an RGBA pixel is. They are then converted to an RGBA pixel with red, green, and blue set to the converted luminance value, and alpha set to the converted alpha value. After this conversion, the pixel is treated as if it had been read as an RGBA pixel. |
| Type | Corresponding Type |
GL_UNSIGNED_BYTE | unsigned 8-bit integer |
GL_BYTE | signed 8-bit integer |
GL_BITMAP | single bits in unsigned 8-bit integers |
GL_UNSIGNED_SHORT | unsigned 16-bit integer |
GL_SHORT | signed 16-bit integer |
GL_UNSIGNED_INT | unsigned 32-bit integer |
GL_INT | 32-bit integer |
GL_FLOAT | single-precision floating-point |
GL_UNSIGNED_BYTE_3_3_2 | unsigned 8-bit integer |
GL_UNSIGNED_BYTE_2_3_3_REV | unsigned 8-bit integer with reversed component ordering |
GL_UNSIGNED_SHORT_5_6_5 | unsigned 16-bit integer |
GL_UNSIGNED_SHORT_5_6_5_REV | unsigned 16-bit integer with reversed component ordering |
GL_UNSIGNED_SHORT_4_4_4_4 | unsigned 16-bit integer |
GL_UNSIGNED_SHORT_4_4_4_4_REV | unsigned 16-bit integer with reversed component ordering |
GL_UNSIGNED_SHORT_5_5_5_1 | unsigned 16-bit integer |
GL_UNSIGNED_SHORT_1_5_5_5_REV | unsigned 16-bit integer with reversed component ordering |
GL_UNSIGNED_INT_8_8_8_8 | unsigned 32-bit integer |
GL_UNSIGNED_INT_8_8_8_8_REV | unsigned 32-bit integer with reversed component ordering |
GL_UNSIGNED_INT_10_10_10_2 | unsigned 32-bit integer |
GL_UNSIGNED_INT_2_10_10_10_REV | unsigned 32-bit integer with reversed component ordering |
The rasterization described so far assumes pixel zoom factors of 1. If
glPixelZoom is used to change the x and y pixel zoom
factors, pixels are converted to fragments as follows. If
(xr, yr) is the current raster
position, and a given pixel is in the nth column and mth row
of the pixel rectangle, then fragments are generated for pixels whose
centers are in the rectangle with corners at
(xr+zoomxn, yr+zoomym) (xr+zoomx(n+1), yr+zoomy(m+1))
where zoomx is the value of GL_ZOOM_X and
zoomy is the value of GL_ZOOM_Y.
widthheightSpecify the dimensions of the pixel rectangle to be written into the frame buffer.
formatSpecifies the format of the pixel data. Symbolic constants
GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT,
GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_RED, GL_GREEN,
GL_BLUE, GL_ALPHA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA
are accepted.
typeSpecifies the data type for data. Symbolic constants
GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,
GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV
are accepted.
dataSpecifies a pointer to the pixel data.
GL_INVALID_ENUM is generated if format or type is not one
of the accepted values.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not either GL_COLOR_INDEX or GL_STENCIL_INDEX.
GL_INVALID_VALUE is generated if either width or height
is negative.
GL_INVALID_OPERATION is generated if format is
GL_STENCIL_INDEX and there is no stencil buffer.
GL_INVALID_OPERATION is generated if format is GL_RED,
GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA,
GL_BGR, GL_BGRA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA, and
the GL is in color index mode.
GL_INVALID_OPERATION is generated if format is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if format is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
unpacked from the buffer object such that the memory reads required
would exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glDrawPixels is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GL_BGR and GL_BGRA are only valid for format if the GL
version is 1.2 or greater.
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV
are only valid for type if the GL version is 1.2 or greater.
glAlphaFunc, glBlendFunc, glCopyPixels, glDepthFunc,
glLogicOp, glPixelMap, glPixelStore, glPixelTransfer,
glPixelZoom, glRasterPos, glReadPixels, glScissor,
glStencilFunc, glWindowPos
void glEdgeFlag(int flag)
Each vertex of a polygon, separate triangle, or separate quadrilateral
specified between a glBegin/glEnd pair is marked as the start of
either a boundary or nonboundary edge. If the current edge flag is
true when the vertex is specified, the vertex is marked as the start
of a boundary edge. Otherwise, the vertex is marked as the start of a
nonboundary edge. glEdgeFlag sets the edge flag bit to GL_TRUE
if flag is GL_TRUE and to GL_FALSE otherwise.
The vertices of connected triangles and connected quadrilaterals are always marked as boundary, regardless of the value of the edge flag.
Boundary and nonboundary edge flags on vertices are significant only
if GL_POLYGON_MODE is set to GL_POINT or GL_LINE. See
glPolygonMode.
flagSpecifies the current edge flag value, either GL_TRUE or
GL_FALSE. The initial value is GL_TRUE.
flagSpecifies an array that contains a single boolean element, which replaces the current edge flag value.
The current edge flag can be updated at any time. In particular,
glEdgeFlag can be called between a call to glBegin and the
corresponding call to glEnd.
glBegin, glEdgeFlagPointer, glPolygonMode
void glEdgeFlagPointer(int stride, System.Memory pointer)
glEdgeFlagPointer specifies the location and data format of an
array of boolean edge flags to use when rendering. stride
specifies the byte stride from one edge flag to the next, allowing
vertices and attributes to be packed into a single array or stored in
separate arrays.
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while an edge flag array is specified,
pointer is treated as a byte offset into the buffer object's data
store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
saved as edge flag vertex array client-side state
(GL_EDGE_FLAG_ARRAY_BUFFER_BINDING).
When an edge flag array is specified, stride and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the edge flag array, call glEnableClientState
and glDisableClientState with the argument GL_EDGE_FLAG_ARRAY.
If enabled, the edge flag array is used when glDrawArrays,
glMultiDrawArrays, glDrawElements, glMultiDrawElements,
glDrawRangeElements, or glArrayElement is called.
strideSpecifies the byte offset between consecutive edge flags. If stride is 0, the edge flags are understood to be tightly packed in the array. The initial value is 0.
pointerSpecifies a pointer to the first edge flag in the array. The initial value is 0.
GL_INVALID_ENUM is generated if stride is negative.
glEdgeFlagPointer is available only if the GL version is 1.1 or
greater.
Edge flags are not supported for interleaved vertex array formats (see
glInterleavedArrays).
The edge flag array is initially disabled and isn't accessed when
glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glEdgeFlagPointer is not allowed between the execution
of glBegin and the corresponding execution of glEnd, but an
error may or may not be generated. If no error is generated, the
operation is undefined.
glEdgeFlagPointer is typically implemented on the client side.
Edge flag array parameters are client-side state and are therefore not
saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glColorPointer,
glDisableClientState, glDrawArrays, glDrawElements,
glDrawRangeElements, glEdgeFlag, glEnableClientState,
glFogCoordPointer, glIndexPointer, glInterleavedArrays,
glMultiDrawArrays, glMultiDrawElements, glNormalPointer,
glPopClientAttrib, glPushClientAttrib,
glSecondaryColorPointer, glTexCoordPointer,
glVertexAttribPointer, glVertexPointer
void glNewList(int list, int mode)
void glEndList()
Display lists are groups of GL commands that have been stored for
subsequent execution. Display lists are created with glNewList. All
subsequent commands are placed in the display list, in the order
issued, until glEndList is called.
glNewList has two arguments. The first argument, list, is a
positive integer that becomes the unique name for the display list.
Names can be created and reserved with glGenLists and tested for
uniqueness with glIsList. The second argument, mode, is a
symbolic constant that can assume one of two values:
GL_COMPILE | Commands are merely compiled. |
GL_COMPILE_AND_EXECUTE | Commands are executed as they are compiled into the display list. |
glAreTexturesResident, glColorPointer,
glDeleteLists, glDeleteTextures, glDisableClientState,
glEdgeFlagPointer, glEnableClientState, glFeedbackBuffer,
glFinish, glFlush, glGenLists, glGenTextures,
glIndexPointer, glInterleavedArrays, glIsEnabled,
glIsList, glIsTexture, glNormalPointer, glPopClientAttrib,
glPixelStore, glPushClientAttrib, glReadPixels,
glRenderMode, glSelectBuffer, glTexCoordPointer,
glVertexPointer, and all of the glGet commands.
Similarly, glTexImage1D, glTexImage2D, and glTexImage3D are
executed immediately and not compiled into the display list when their
first argument is GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_1D, or
GL_PROXY_TEXTURE_3D, respectively.
When the ARB_imaging extension is supported, glHistogram
executes immediately when its argument is GL_PROXY_HISTOGRAM.
Similarly, glColorTable executes immediately when its first
argument is GL_PROXY_COLOR_TABLE,
GL_PROXY_POST_CONVOLUTION_COLOR_TABLE, or
GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported,
glClientActiveTexture is not compiled into display lists, but
executed immediately.
When glEndList is encountered, the display-list definition is
completed by associating the list with the unique name list
(specified in the glNewList command). If a display list with name
list already exists, it is replaced only when glEndList is
called.
listSpecifies the display-list name.
modeSpecifies the compilation mode, which can be GL_COMPILE or
GL_COMPILE_AND_EXECUTE.
GL_INVALID_VALUE is generated if list is 0.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glEndList is called without
a preceding glNewList, or if glNewList is called while a display
list is being defined.
GL_INVALID_OPERATION is generated if glNewList or glEndList
is executed between the execution of glBegin and the corresponding
execution of glEnd.
GL_OUT_OF_MEMORY is generated if there is insufficient memory to
compile the display list. If the GL version is 1.1 or greater, no
change is made to the previous contents of the display list, if any,
and no other change is made to the GL state. (It is as if no attempt
had been made to create the new display list.)
glCallList and glCallLists can be entered into display lists.
Commands in the display list or lists executed by glCallList or
glCallLists are not included in the display list being created,
even if the list creation mode is GL_COMPILE_AND_EXECUTE.
A display list is just a group of commands and arguments, so errors
generated by commands in a display list must be generated when the
list is executed. If the list is created in GL_COMPILE mode, errors
are not generated until the list is executed.
glCallList, glCallLists, glDeleteLists, glGenLists
void glEvalCoord(float|int u, float|int|void v)
void glEvalCoord(array(float|int) u)
glEvalCoord evaluates enabled one-dimensional maps at argument
u. glEvalCoord does the same for two-dimensional maps using
two domain values, u and v. To define a map, call glMap1
and glMap2; to enable and disable it, call glEnable and
glDisable.
When one of the glEvalCoord commands is issued, all currently
enabled maps of the indicated dimension are evaluated. Then, for each
enabled map, it is as if the corresponding GL command had been issued
with the computed value. That is, if GL_MAP1_INDEX or
GL_MAP2_INDEX is enabled, a glIndex command is simulated. If
GL_MAP1_COLOR_4 or GL_MAP2_COLOR_4 is enabled, a glColor
command is simulated. If GL_MAP1_NORMAL or GL_MAP2_NORMAL is
enabled, a normal vector is produced, and if any of
GL_MAP1_TEXTURE_COORD_1, GL_MAP1_TEXTURE_COORD_2,
GL_MAP1_TEXTURE_COORD_3, GL_MAP1_TEXTURE_COORD_4,
GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2,
GL_MAP2_TEXTURE_COORD_3, or GL_MAP2_TEXTURE_COORD_4 is enabled,
then an appropriate glTexCoord command is simulated.
For color, color index, normal, and texture coordinates the GL uses
evaluated values instead of current values for those evaluations that
are enabled, and current values otherwise, However, the evaluated
values do not update the current values. Thus, if glVertex commands
are interspersed with glEvalCoord commands, the color, normal, and
texture coordinates associated with the glVertex commands are not
affected by the values generated by the glEvalCoord commands, but
only by the most recent glColor, glIndex, glNormal, and
glTexCoord commands.
No commands are issued for maps that are not enabled. If more than one
texture evaluation is enabled for a particular dimension (for example,
GL_MAP2_TEXTURE_COORD_1 and GL_MAP2_TEXTURE_COORD_2), then only
the evaluation of the map that produces the larger number of
coordinates (in this case, GL_MAP2_TEXTURE_COORD_2) is carried out.
GL_MAP1_VERTEX_4 overrides GL_MAP1_VERTEX_3, and
GL_MAP2_VERTEX_4 overrides GL_MAP2_VERTEX_3, in the same manner.
If neither a three- nor a four-component vertex map is enabled for the
specified dimension, the glEvalCoord command is ignored.
If you have enabled automatic normal generation, by calling
glEnable with argument GL_AUTO_NORMAL, glEvalCoord generates
surface normals analytically, regardless of the contents or enabling
of the GL_MAP2_NORMAL map. Let
m=∂p/∂u×∂p/∂v
Then the generated normal n is n=m/∥m∥
If automatic normal generation is disabled, the corresponding normal
map GL_MAP2_NORMAL, if enabled, is used to produce a normal. If
neither automatic normal generation nor a normal map is enabled, no
normal is generated for glEvalCoord commands.
uSpecifies a value that is the domain coordinate u to the basis
function defined in a previous glMap1 or glMap2 command.
vSpecifies a value that is the domain coordinate v to the basis
function defined in a previous glMap2 command. This argument is not
present in a glEvalCoord command.
uSpecifies an array containing either one or two domain coordinates.
The first coordinate is u. The second coordinate is v, which
is present only in glEvalCoord versions.
glBegin, glColor, glEnable, glEvalMesh1 and
glEvalMesh2, glEvalPoint, glIndex, glMap1, glMap2,
glMapGrid, glNormal, glTexCoord, glVertex
void glEvalMesh1(int mode, int i1, int i2)
void glEvalMesh2(int mode, int i1, int i2, int j1, int j2)
glMapGrid and glEvalMesh1 and glEvalMesh2 are used in tandem
to efficiently generate and evaluate a series of evenly-spaced map
domain values. glEvalMesh1 and glEvalMesh2 steps through the
integer domain of a one- or two-dimensional grid, whose range is the
domain of the evaluation maps specified by glMap1 and glMap2.
mode determines whether the resulting vertices are connected as
points, lines, or filled polygons.
In the one-dimensional case, glEvalMesh1, the mesh is generated as
if the following code fragment were executed:
glBegin( type );
for ( i = i1; i <= i2; i += 1 )
glEvalCoord1( i·Δu+u1 );
glEnd();where
Δu=(u2-u1)/n
and n, u1, and u2 are the arguments to
the most recent glMapGrid command. type is GL_POINTS if
mode is GL_POINT, or GL_LINES if mode is GL_LINE.
The one absolute numeric requirement is that if i=n , then the value computed from i·Δu+u1 is exactly u2.
In the two-dimensional case, glEvalMesh2, let .cp
Δu=(u2-u1)/n
Δv=(v2-v1)/m
where n, u1, u2, m, v1,
and v2 are the arguments to the most recent glMapGrid
command. Then, if mode is GL_FILL, the glEvalMesh2 command
is equivalent to:
for ( j = j1; j < j2; j += 1 ) {
glBegin( GL_QUAD_STRIP );
for ( i = i1; i <= i2; i += 1 ) {
glEvalCoord2( i·Δu+u1,j·Δv+v1 );
glEvalCoord2( i·Δu+u1,(j+1)·Δv+v1 );
}
glEnd();
}If mode is GL_LINE, then a call to glEvalMesh2 is
equivalent to:
for ( j = j1; j <= j2; j += 1 ) {
glBegin( GL_LINE_STRIP );
for ( i = i1; i <= i2; i += 1 )
glEvalCoord2( i·Δu+u1,j·Δv+v1 );
glEnd();
}
for ( i = i1; i <= i2; i += 1 ) {
glBegin( GL_LINE_STRIP );
for ( j = j1; j <= j1; j += 1 )
glEvalCoord2( i·Δu+u1,j·Δv+v1 );
glEnd();
}And finally, if mode is GL_POINT, then a call to
glEvalMesh2 is equivalent to:
glBegin( GL_POINTS );
for ( j = j1; j <= j2; j += 1 )
for ( i = i1; i <= i2; i += 1 )
glEvalCoord2( i·Δu+u1,j·Δv+v1 );
glEnd();In all three cases, the only absolute numeric requirements are that if i=n , then the value computed from i·Δu+u1 is exactly u2, and if j=m , then the value computed from j·Δv+v1 is exactly v2.
modeIn glEvalMesh1, specifies whether to compute a one-dimensional mesh
of points or lines. Symbolic constants GL_POINT and GL_LINE are
accepted.
i1i2Specify the first and last integer values for grid domain variable i.
modeIn glEvalMesh2, specifies whether to compute a two-dimensional mesh
of points, lines, or polygons. Symbolic constants GL_POINT,
GL_LINE, and GL_FILL are accepted.
i1i2Specify the first and last integer values for grid domain variable i.
j1j2Specify the first and last integer values for grid domain variable j.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glEvalMesh1 and
glEvalMesh2 is executed between the execution of glBegin and the
corresponding execution of glEnd.
glBegin, glEvalCoord, glEvalPoint, glMap1, glMap2,
glMapGrid
void glEvalPoint(int|array(int) i, int|void j)
glMapGrid and glEvalMesh1 and glEvalMesh2 are used in tandem
to efficiently generate and evaluate a series of evenly spaced map
domain values. glEvalPoint can be used to evaluate a single grid
point in the same gridspace that is traversed by glEvalMesh1 and
glEvalMesh2. Calling glEvalPoint is equivalent to calling
glEvalCoord1( i·Δu+u1 );where Δu=(u2-u1)/n
and n, u1, and u2 are the arguments to
the most recent glMapGrid command. The one absolute numeric
requirement is that if
i=n
, then the value computed from
i·Δu+u1
is exactly u2.
In the two-dimensional case, glEvalPoint, let
Δu=(u2-u1)/n Δv=(v2-v1)/m
where n, u1, u2, m, v1,
and v2 are the arguments to the most recent glMapGrid
command. Then the glEvalPoint command is equivalent to calling
glEvalCoord2( i·Δu+u1,j·Δv+v1 );The only absolute numeric requirements are that if i=n , then the value computed from i·Δu+u1 is exactly u2, and if j=m , then the value computed from j·Δv+v1 is exactly v2.
iSpecifies the integer value for grid domain variable i.
jSpecifies the integer value for grid domain variable j
(glEvalPoint only).
glEvalCoord, glEvalMesh1 and glEvalMesh2, glMap1,
glMap2, glMapGrid
void glFeedbackBuffer(int size, int type, System.Memory buffer)
The glFeedbackBuffer function controls feedback. Feedback, like
selection, is a GL mode. The mode is selected by calling
glRenderMode with GL_FEEDBACK. When the GL is in feedback mode,
no pixels are produced by rasterization. Instead, information about
primitives that would have been rasterized is fed back to the
application using the GL.
glFeedbackBuffer has three arguments: buffer is an array of
floating-point values into which feedback information is placed.
size indicates the size of the array. type is a symbolic
constant describing the information that is fed back for each vertex.
glFeedbackBuffer must be issued before feedback mode is enabled (by
calling glRenderMode with argument GL_FEEDBACK). Setting
GL_FEEDBACK without establishing the feedback buffer, or calling
glFeedbackBuffer while the GL is in feedback mode, is an error.
When glRenderMode is called while in feedback mode, it returns the
number of entries placed in the feedback array and resets the feedback
array pointer to the base of the feedback buffer. The returned value
never exceeds size. If the feedback data required more room than
was available in buffer, glRenderMode returns a negative
value. To take the GL out of feedback mode, call glRenderMode with
a parameter value other than GL_FEEDBACK.
While in feedback mode, each primitive, bitmap, or pixel rectangle
that would be rasterized generates a block of values that are copied
into the feedback array. If doing so would cause the number of entries
to exceed the maximum, the block is partially written so as to fill
the array (if there is any room left at all), and an overflow flag is
set. Each block begins with a code indicating the primitive type,
followed by values that describe the primitive's vertices and
associated data. Entries are also written for bitmaps and pixel
rectangles. Feedback occurs after polygon culling and glPolygonMode
interpretation of polygons has taken place, so polygons that are
culled are not returned in the feedback buffer. It can also occur
after polygons with more than three edges are broken up into
triangles, if the GL implementation renders polygons by performing
this decomposition.
The glPassThrough command can be used to insert a marker into the
feedback buffer. See glPassThrough.
Following is the grammar for the blocks of values written into the feedback buffer. Each primitive is indicated with a unique identifying value followed by some number of vertices. Polygon entries include an integer value indicating how many vertices follow. A vertex is fed back as some number of floating-point values, as determined by type. Colors are fed back as four values in RGBA mode and one value in color index mode.
feedbackList ← feedbackItem feedbackList | feedbackItem
feedbackItem ← point | lineSegment | polygon | bitmap | pixelRectangle | passThru
point
←
GL_POINT_TOKEN vertex
lineSegment
←
GL_LINE_TOKEN vertex vertex | GL_LINE_RESET_TOKEN vertex vertex
polygon
←
GL_POLYGON_TOKEN n polySpec
polySpec ← polySpec vertex | vertex vertex vertex
bitmap
←
GL_BITMAP_TOKEN vertex
pixelRectangle
←
GL_DRAW_PIXEL_TOKEN vertex | GL_COPY_PIXEL_TOKEN vertex
passThru
←
GL_PASS_THROUGH_TOKEN value
vertex ← 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture
2d ← value value
3d ← value value value
3dColor ← value value value color
3dColorTexture ← value value value color tex
4dColorTexture ← value value value value color tex
color ← rgba | index
rgba ← value value value value
index ← value
tex ← value value value value
value is a floating-point number, and n is a floating-point
integer giving the number of vertices in the polygon.
GL_POINT_TOKEN, GL_LINE_TOKEN, GL_LINE_RESET_TOKEN,
GL_POLYGON_TOKEN, GL_BITMAP_TOKEN, GL_DRAW_PIXEL_TOKEN,
GL_COPY_PIXEL_TOKEN and GL_PASS_THROUGH_TOKEN are symbolic
floating-point constants. GL_LINE_RESET_TOKEN is returned whenever
the line stipple pattern is reset. The data returned as a vertex
depends on the feedback type.
The following table gives the correspondence between type and the number of values per vertex. k is 1 in color index mode and 4 in RGBA mode.
| Type | Coordinates | Color | Texture | Total Number of Values |
GL_2D | x, y | 2 | ||
GL_3D | x, y, z | 3 | ||
GL_3D_COLOR | x, y, z | k | 3+k | |
GL_3D_COLOR_TEXTURE | x, y, z | k | 4 | 7+k |
GL_4D_COLOR_TEXTURE | x, y, z, w | k | 4 | 8+k |
sizeSpecifies the maximum number of values that can be written into buffer.
typeSpecifies a symbolic constant that describes the information that will
be returned for each vertex. GL_2D, GL_3D, GL_3D_COLOR,
GL_3D_COLOR_TEXTURE, and GL_4D_COLOR_TEXTURE are accepted.
bufferReturns the feedback data.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if size is negative.
GL_INVALID_OPERATION is generated if glFeedbackBuffer is called
while the render mode is GL_FEEDBACK, or if glRenderMode is
called with argument GL_FEEDBACK before glFeedbackBuffer is
called at least once.
GL_INVALID_OPERATION is generated if glFeedbackBuffer is
executed between the execution of glBegin and the corresponding
execution of glEnd.
glFeedbackBuffer, when used in a display list, is not compiled into
the display list but is executed immediately.
glFeedbackBuffer returns only the texture coordinate of texture
unit GL_TEXTURE0.
glBegin, glLineStipple, glPassThrough, glPolygonMode,
glRenderMode, glSelectBuffer
void glFinish()
glFinish does not return until the effects of all previously called
GL commands are complete. Such effects include all changes to GL
state, all changes to connection state, and all changes to the frame
buffer contents.
GL_INVALID_OPERATION is generated if glFinish is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glFinish requires a round trip to the server.
glFlush
void glFlush()
Different GL implementations buffer commands in several different
locations, including network buffers and the graphics accelerator
itself. glFlush empties all of these buffers, causing all issued
commands to be executed as quickly as they are accepted by the actual
rendering engine. Though this execution may not be completed in any
particular time period, it does complete in finite time.
Because any GL program might be executed over a network, or on an
accelerator that buffers commands, all programs should call glFlush
whenever they count on having all of their previously issued commands
completed. For example, call glFlush before waiting for user input
that depends on the generated image.
GL_INVALID_OPERATION is generated if glFlush is executed between
the execution of glBegin and the corresponding execution of
glEnd.
glFlush can return at any time. It does not wait until the
execution of all previously issued GL commands is complete.
glFinish
void glFog(int pname, float|int|array(float|int) param)
Fog is initially disabled. While enabled, fog affects rasterized
geometry, bitmaps, and pixel blocks, but not buffer clear operations.
To enable and disable fog, call glEnable and glDisable with
argument GL_FOG.
glFog assigns the value or values in params to the fog
parameter specified by pname. The following values are accepted
for pname:
GL_FOG_MODE | params is a single integer or floating-point value that
specifies the equation to be used to compute the fog blend factor, f. Three symbolic constants are accepted: |
GL_FOG_DENSITY | params is a single integer or floating-point value that specifies density, the fog density used in both exponential fog equations. Only nonnegative densities are accepted. The initial fog density is 1. |
GL_FOG_START | params is a single integer or floating-point value that specifies start, the near distance used in the linear fog equation. The initial near distance is 0. |
GL_FOG_END | params is a single integer or floating-point value that specifies end, the far distance used in the linear fog equation. The initial far distance is 1. |
GL_FOG_INDEX | params is a single integer or floating-point value that specifies if, the fog color index. The initial fog index is 0. |
GL_FOG_COLOR | params contains four integer or floating-point values that specify Cf, the fog color. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. After conversion, all color components are clamped to the range [0, 1]. The initial fog color is (0, 0, 0, 0). |
GL_FOG_COORD_SRC | params contains either of the following symbolic
constants: |
GL_FOG_COORD_SRC is GL_FRAGMENT_DEPTH) or
the current fog coordinate (in the case that GL_FOG_COORD_SRC is
GL_FOG_COORD). The equation for GL_LINEAR fog is
f=end-c/end-start
The equation for GL_EXP fog is
f=e-(density·c)
The equation for GL_EXP2 fog is
f=e-(density·c)2
Regardless of the fog mode, f is clamped to the range [0, 1] after it is computed. Then, if the GL is in RGBA color mode, the fragment's red, green, and blue colors, represented by Cr, are replaced by
Cr″=f×Cr+(1-f)×Cf
Fog does not affect a fragment's alpha component.
In color index mode, the fragment's color index ir is replaced by
ir″=ir+(1-f)×if
pnameSpecifies a single-valued fog parameter. GL_FOG_MODE,
GL_FOG_DENSITY, GL_FOG_START, GL_FOG_END, GL_FOG_INDEX,
and GL_FOG_COORD_SRC are accepted.
paramSpecifies the value that pname will be set to.
pnameSpecifies a fog parameter. GL_FOG_MODE, GL_FOG_DENSITY,
GL_FOG_START, GL_FOG_END, GL_FOG_INDEX, GL_FOG_COLOR, and
GL_FOG_COORD_SRC are accepted.
paramsSpecifies the value or values to be assigned to pname.
GL_FOG_COLOR requires an array of four values. All other parameters
accept an array containing only a single value.
GL_INVALID_ENUM is generated if pname is not an accepted
value, or if pname is GL_FOG_MODE and params is not an
accepted value.
GL_INVALID_VALUE is generated if pname is GL_FOG_DENSITY
and params is negative.
GL_INVALID_OPERATION is generated if glFog is executed between
the execution of glBegin and the corresponding execution of
glEnd.
GL_FOG_COORD_SRC is available only if the GL version is 1.4 or
greater.
glEnable
void glFrontFace(int mode)
In a scene composed entirely of opaque closed surfaces, back-facing
polygons are never visible. Eliminating these invisible polygons has
the obvious benefit of speeding up the rendering of the image. To
enable and disable elimination of back-facing polygons, call
glEnable and glDisable with argument GL_CULL_FACE.
The projection of a polygon to window coordinates is said to have
clockwise winding if an imaginary object following the path from its
first vertex, its second vertex, and so on, to its last vertex, and
finally back to its first vertex, moves in a clockwise direction about
the interior of the polygon. The polygon's winding is said to be
counterclockwise if the imaginary object following the same path moves
in a counterclockwise direction about the interior of the polygon.
glFrontFace specifies whether polygons with clockwise winding in
window coordinates, or counterclockwise winding in window coordinates,
are taken to be front-facing. Passing GL_CCW to mode selects
counterclockwise polygons as front-facing; GL_CW selects clockwise
polygons as front-facing. By default, counterclockwise polygons are
taken to be front-facing.
modeSpecifies the orientation of front-facing polygons. GL_CW and
GL_CCW are accepted. The initial value is GL_CCW.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glFrontFace is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCullFace, glLightModel
void glFrustum(float left, float right, float bottom, float top, float nearVal, float farVal)
glFrustum describes a perspective matrix that produces a
perspective projection. The current matrix (see glMatrixMode) is
multiplied by this matrix and the result replaces the current matrix,
as if glMultMatrix were called with the following matrix as its
argument:
[
| 2nearVal/right-left | 0 | A | 0 |
| 0 | 2nearVal/top-bottom | B | 0 |
| 0 | 0 | C | D |
| 0 | 0 | -1 | 0 |
A=right+left/right-left
B=top+bottom/top-bottom
C=-farVal+nearVal/farVal-nearVal
D=-2farValnearVal/farVal-nearVal
Typically, the matrix mode is GL_PROJECTION, and
(left, bottom, -nearVal)
and
(right, top, -nearVal)
specify the points on the near clipping plane that are mapped to the
lower left and upper right corners of the window, assuming that the
eye is located at (0, 0, 0).
-farVal
specifies the location of the far clipping plane. Both nearVal
and farVal must be positive.
Use glPushMatrix and glPopMatrix to save and restore the current
matrix stack.
leftrightSpecify the coordinates for the left and right vertical clipping planes.
bottomtopSpecify the coordinates for the bottom and top horizontal clipping planes.
nearValfarValSpecify the distances to the near and far depth clipping planes. Both distances must be positive.
GL_INVALID_VALUE is generated if nearVal or farVal is not
positive, or if left = right, or bottom = top, or
near = far.
GL_INVALID_OPERATION is generated if glFrustum is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Depth buffer precision is affected by the values specified for nearVal and farVal. The greater the ratio of farVal to nearVal is, the less effective the depth buffer will be at distinguishing between surfaces that are near each other. If
r=farVal/nearVal
roughly log2(r) bits of depth buffer precision are lost. Because r approaches infinity as nearVal approaches 0, nearVal must never be set to 0.
glOrtho, glMatrixMode, glMultMatrix, glPushMatrix,
glViewport
int glGenLists(int range)
glGenLists has one argument, range. It returns an integer
n such that range contiguous empty display lists, named
n,
n+1
, ...,
n+range-1
, are created. If range is 0, if there is no group of range
contiguous names available, or if any error is generated, no display
lists are generated, and 0 is returned.
rangeSpecifies the number of contiguous empty display lists to be generated.
GL_INVALID_VALUE is generated if range is negative.
GL_INVALID_OPERATION is generated if glGenLists is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCallList, glCallLists, glDeleteLists, glNewList
array(int) glGenTextures(int n)
glGenTextures returns n texture names in an array. There is no
guarantee that the names form a contiguous set of integers; however,
it is guaranteed that none of the returned names was in use
immediately before the call to glGenTextures.
The generated textures have no dimensionality; they assume the
dimensionality of the texture target to which they are first bound
(see glBindTexture).
Texture names returned by a call to glGenTextures are not returned
by subsequent calls, unless they are first deleted with
glDeleteTextures.
nSpecifies the number of texture names to be generated.
GL_INVALID_VALUE is generated if n is negative.
GL_INVALID_OPERATION is generated if glGenTextures is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glGenTextures is available only if the GL version is 1.1 or
greater.
glBindTexture, glCopyTexImage1D, glCopyTexImage2D,
glDeleteTextures, glGet, glGetTexParameter, glTexImage1D,
glTexImage2D, glTexImage3D, glTexParameter
int|float|array(int)|array(float) glGet(int pname)
This command returns values for simple state variables in GL. pname is a symbolic constant indicating the state variable to be returned.
Type conversion is performed if params has a different type than
the state variable value being requested. If glGet is called, a
floating-point (or integer) value is converted to GL_FALSE if and
only if it is 0.0 (or 0). Otherwise, it is converted to GL_TRUE. If
glGet is called, boolean values are returned as GL_TRUE or
GL_FALSE, and most floating-point values are rounded to the nearest
integer value. Floating-point colors and normals, however, are
returned with a linear mapping that maps 1.0 to the most positive
representable integer value and -1.0 to the most negative
representable integer value. If glGet or glGet is called,
boolean values are returned as GL_TRUE or GL_FALSE, and integer
values are converted to floating-point values.
The following symbolic constants are accepted by pname:
GL_ACCUM_ALPHA_BITS | params returns one value, the number of alpha bitplanes in the accumulation buffer. |
GL_ACCUM_BLUE_BITS | params returns one value, the number of blue bitplanes in the accumulation buffer. |
GL_ACCUM_CLEAR_VALUE | params returns four values: the red, green, blue,
and alpha values used to clear the accumulation buffer. Integer
values, if requested, are linearly mapped from the internal
floating-point representation such that 1.0 returns the most positive
representable integer value, and -1.0 returns the most negative
representable integer value. The initial value is (0, 0, 0, 0). See
|
GL_ACCUM_GREEN_BITS | params returns one value, the number of green bitplanes in the accumulation buffer. |
GL_ACCUM_RED_BITS | params returns one value, the number of red bitplanes in the accumulation buffer. |
GL_ACTIVE_TEXTURE | params returns a single value indicating the
active multitexture unit. The initial value is |
GL_ALIASED_POINT_SIZE_RANGE | params returns two values, the smallest and largest supported sizes for aliased points. |
GL_ALIASED_LINE_WIDTH_RANGE | params returns two values, the smallest and largest supported widths for aliased lines. |
GL_ALPHA_BIAS | params returns one value, the alpha bias factor
used during pixel transfers. The initial value is 0. See |
GL_ALPHA_BITS | params returns one value, the number of alpha bitplanes in each color buffer. |
GL_ALPHA_SCALE | params returns one value, the alpha scale factor
used during pixel transfers. The initial value is 1. See |
GL_ALPHA_TEST | params returns a single boolean value indicating
whether alpha testing of fragments is enabled. The initial value is
|
GL_ALPHA_TEST_FUNCparams returns one
value, | the symbolic name of the alpha test function. The initial
value is |
GL_ALPHA_TEST_REF | params returns one value, the reference value for
the alpha test. The initial value is 0. See |
GL_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object currently bound to the target |
GL_ATTRIB_STACK_DEPTH | params returns one value, the depth of the
attribute stack. If the stack is empty, 0 is returned. The initial
value is 0. See |
GL_AUTO_NORMAL | params returns a single boolean value indicating
whether 2D map evaluation automatically generates surface normals. The
initial value is |
GL_AUX_BUFFERS | params returns one value, the number of auxiliary color buffers available. |
GL_BLEND | params returns a single boolean value indicating
whether blending is enabled. The initial value is |
GL_BLEND_COLOR | params returns four values, the red, green, blue,
and alpha values which are the components of the blend color. See |
GL_BLEND_DST_ALPHA | params returns one value, the symbolic constant
identifying the alpha destination blend function. The initial value is
|
GL_BLEND_DST_RGB | params returns one value, the symbolic constant
identifying the RGB destination blend function. The initial value is
|
GL_BLEND_EQUATION_RGB | params returns one value, a symbolic constant
indicating whether the RGB blend equation is |
GL_BLEND_EQUATION_ALPHA | params returns one value, a symbolic constant
indicating whether the Alpha blend equation is |
GL_BLEND_SRC_ALPHA | params returns one value, the symbolic constant
identifying the alpha source blend function. The initial value is |
GL_BLEND_SRC_RGB | params returns one value, the symbolic constant
identifying the RGB source blend function. The initial value is |
GL_BLUE_BIAS | params returns one value, the blue bias factor
used during pixel transfers. The initial value is 0. See |
GL_BLUE_BITS | params returns one value, the number of blue bitplanes in each color buffer. |
GL_BLUE_SCALE | params returns one value, the blue scale factor
used during pixel transfers. The initial value is 1. See |
GL_CLIENT_ACTIVE_TEXTURE | params returns a single integer value indicating
the current client active multitexture unit. The initial value is |
GL_CLIENT_ATTRIB_STACK_DEPTH | params returns one value indicating the depth of
the attribute stack. The initial value is 0. See |
| GL_CLIP_PLANEi | params returns a single boolean value indicating
whether the specified clipping plane is enabled. The initial value is
|
GL_COLOR_ARRAY | params returns a single boolean value indicating
whether the color array is enabled. The initial value is |
GL_COLOR_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the color array. This buffer object
would have been bound to the target |
GL_COLOR_ARRAY_SIZE | params returns one value, the number of components
per color in the color array. The initial value is 4. See |
GL_COLOR_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive colors in the color array. The initial value is 0. See
|
GL_COLOR_ARRAY_TYPE | params returns one value, the data type of each
component in the color array. The initial value is |
GL_COLOR_CLEAR_VALUE | params returns four values: the red, green, blue,
and alpha values used to clear the color buffers. Integer values, if
requested, are linearly mapped from the internal floating-point
representation such that 1.0 returns the most positive representable
integer value, and -1.0 returns the most negative representable
integer value. The initial value is (0, 0, 0, 0). See |
GL_COLOR_LOGIC_OP | params returns a single boolean value indicating
whether a fragment's RGBA color values are merged into the framebuffer
using a logical operation. The initial value is |
GL_COLOR_MATERIAL | params returns a single boolean value indicating
whether one or more material parameters are tracking the current
color. The initial value is |
GL_COLOR_MATERIAL_FACE | params returns one value, a symbolic constant
indicating which materials have a parameter that is tracking the
current color. The initial value is |
GL_COLOR_MATERIAL_PARAMETER | params returns one value, a symbolic constant
indicating which material parameters are tracking the current color.
The initial value is |
GL_COLOR_MATRIX | params returns sixteen values: the color matrix on
the top of the color matrix stack. Initially this matrix is the
identity matrix. See |
GL_COLOR_MATRIX_STACK_DEPTH | params returns one value, the maximum supported
depth of the projection matrix stack. The value must be at least 2.
See |
GL_COLOR_SUM | params returns a single boolean value indicating
whether primary and secondary color sum is enabled. See |
GL_COLOR_TABLE | params returns a single boolean value indicating
whether the color table lookup is enabled. See |
GL_COLOR_WRITEMASK | params returns four boolean values: the red,
green, blue, and alpha write enables for the color buffers. The
initial value is ( |
GL_COMPRESSED_TEXTURE_FORMATS | params returns a list of symbolic constants of
length |
GL_CONVOLUTION_1D | params returns a single boolean value indicating
whether 1D convolution is enabled. The initial value is |
GL_CONVOLUTION_2D | params returns a single boolean value indicating
whether 2D convolution is enabled. The initial value is |
GL_CULL_FACE | params returns a single boolean value indicating
whether polygon culling is enabled. The initial value is |
GL_CULL_FACE_MODE | params returns one value, a symbolic constant
indicating which polygon faces are to be culled. The initial value is
|
GL_CURRENT_COLOR | params returns four values: the red, green, blue,
and alpha values of the current color. Integer values, if requested,
are linearly mapped from the internal floating-point representation
such that 1.0 returns the most positive representable integer value,
and -1.0 returns the most negative representable integer value. The
initial value is (1, 1, 1, 1). See |
GL_CURRENT_FOG_COORD | params returns one value, the current fog
coordinate. The initial value is 0. See |
GL_CURRENT_INDEX | params returns one value, the current color index.
The initial value is 1. See |
GL_CURRENT_NORMAL | params returns three values: the x, y, and z values of the current normal. Integer values, if
requested, are linearly mapped from the internal floating-point
representation such that 1.0 returns the most positive representable
integer value, and -1.0 returns the most negative representable
integer value. The initial value is (0, 0, 1). See |
GL_CURRENT_PROGRAM | params returns one value, the name of the program
object that is currently active, or 0 if no program object is active.
See |
GL_CURRENT_RASTER_COLOR | params returns four values: the red, green, blue,
and alpha color values of the current raster position. Integer values,
if requested, are linearly mapped from the internal floating-point
representation such that 1.0 returns the most positive representable
integer value, and -1.0 returns the most negative representable
integer value. The initial value is (1, 1, 1, 1). See |
GL_CURRENT_RASTER_DISTANCE | params returns one value, the distance from the
eye to the current raster position. The initial value is 0. See |
GL_CURRENT_RASTER_INDEX | params returns one value, the color index of the
current raster position. The initial value is 1. See |
GL_CURRENT_RASTER_POSITION | params returns four values: the x, y, z, and w components of the current raster position.
x, y, and z are in window coordinates, and w is in clip coordinates. The initial value is (0, 0, 0, 1). See
|
GL_CURRENT_RASTER_POSITION_VALID | params returns a single boolean value indicating
whether the current raster position is valid. The initial value is
|
GL_CURRENT_RASTER_SECONDARY_COLOR | params returns four values: the red, green, blue,
and alpha secondary color values of the current raster position.
Integer values, if requested, are linearly mapped from the internal
floating-point representation such that 1.0 returns the most positive
representable integer value, and -1.0 returns the most negative
representable integer value. The initial value is (1, 1, 1, 1). See
|
GL_CURRENT_RASTER_TEXTURE_COORDS | params returns four values: the s, t, r, and q texture coordinates of the current raster
position. The initial value is (0, 0, 0, 1). See |
GL_CURRENT_SECONDARY_COLOR | params returns four values: the red, green, blue,
and alpha values of the current secondary color. Integer values, if
requested, are linearly mapped from the internal floating-point
representation such that 1.0 returns the most positive representable
integer value, and -1.0 returns the most negative representable
integer value. The initial value is (0, 0, 0, 0). See |
GL_CURRENT_TEXTURE_COORDS | params returns four values: the s, t, r, and q current texture coordinates. The initial
value is (0, 0, 0, 1). See |
GL_DEPTH_BIAS | params returns one value, the depth bias factor
used during pixel transfers. The initial value is 0. See |
GL_DEPTH_BITS | params returns one value, the number of bitplanes in the depth buffer. |
GL_DEPTH_CLEAR_VALUE | params returns one value, the value that is used
to clear the depth buffer. Integer values, if requested, are linearly
mapped from the internal floating-point representation such that 1.0
returns the most positive representable integer value, and -1.0
returns the most negative representable integer value. The initial
value is 1. See |
GL_DEPTH_FUNC | params returns one value, the symbolic constant
that indicates the depth comparison function. The initial value is
|
GL_DEPTH_RANGE | params returns two values: the near and far
mapping limits for the depth buffer. Integer values, if requested, are
linearly mapped from the internal floating-point representation such
that 1.0 returns the most positive representable integer value, and
-1.0 returns the most negative representable integer value. The
initial value is (0, 1). See |
GL_DEPTH_SCALE | params returns one value, the depth scale factor
used during pixel transfers. The initial value is 1. See |
GL_DEPTH_TEST | params returns a single boolean value indicating
whether depth testing of fragments is enabled. The initial value is
|
GL_DEPTH_WRITEMASK | params returns a single boolean value indicating
if the depth buffer is enabled for writing. The initial value is |
GL_DITHER | params returns a single boolean value indicating
whether dithering of fragment colors and indices is enabled. The
initial value is |
GL_DOUBLEBUFFER | params returns a single boolean value indicating whether double buffering is supported. |
GL_DRAW_BUFFER | params returns one value, a symbolic constant
indicating which buffers are being drawn to. See |
GL_DRAW_BUFFERi | params returns one value, a symbolic constant
indicating which buffers are being drawn to by the corresponding
output color. See |
GL_EDGE_FLAG | params returns a single boolean value indicating
whether the current edge flag is |
GL_EDGE_FLAG_ARRAY | params returns a single boolean value indicating
whether the edge flag array is enabled. The initial value is |
GL_EDGE_FLAG_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the edge flag array. This buffer object
would have been bound to the target |
GL_EDGE_FLAG_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive edge flags in the edge flag array. The initial value is 0.
See |
GL_ELEMENT_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object currently bound to the target |
GL_FEEDBACK_BUFFER_SIZE | params returns one value, the size of the feedback
buffer. See |
GL_FEEDBACK_BUFFER_TYPE | params returns one value, the type of the feedback
buffer. See |
GL_FOG | params returns a single boolean value indicating
whether fogging is enabled. The initial value is |
GL_FOG_COORD_ARRAY | params returns a single boolean value indicating
whether the fog coordinate array is enabled. The initial value is |
GL_FOG_COORD_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the fog coordinate array. This buffer
object would have been bound to the target |
GL_FOG_COORD_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive fog coordinates in the fog coordinate array. The initial
value is 0. See |
GL_FOG_COORD_ARRAY_TYPE | params returns one value, the type of the fog
coordinate array. The initial value is |
GL_FOG_COORD_SRC | params returns one value, a symbolic constant
indicating the source of the fog coordinate. The initial value is |
GL_FOG_COLOR | params returns four values: the red, green, blue,
and alpha components of the fog color. Integer values, if requested,
are linearly mapped from the internal floating-point representation
such that 1.0 returns the most positive representable integer value,
and -1.0 returns the most negative representable integer value. The
initial value is (0, 0, 0, 0). See |
GL_FOG_DENSITY | params returns one value, the fog density
parameter. The initial value is 1. See |
GL_FOG_END | params returns one value, the end factor for the
linear fog equation. The initial value is 1. See |
GL_FOG_HINT | params returns one value, a symbolic constant
indicating the mode of the fog hint. The initial value is |
GL_FOG_INDEX | params returns one value, the fog color index. The
initial value is 0. See |
GL_FOG_MODE | params returns one value, a symbolic constant
indicating which fog equation is selected. The initial value is |
GL_FOG_START | params returns one value, the start factor for the
linear fog equation. The initial value is 0. See |
GL_FRAGMENT_SHADER_DERIVATIVE_HINT | params returns one value, a symbolic constant
indicating the mode of the derivative accuracy hint for fragment
shaders. The initial value is |
GL_FRONT_FACE | params returns one value, a symbolic constant
indicating whether clockwise or counterclockwise polygon winding is
treated as front-facing. The initial value is |
GL_GENERATE_MIPMAP_HINT | params returns one value, a symbolic constant
indicating the mode of the mipmap generation filtering hint. The
initial value is |
GL_GREEN_BIAS | params returns one value, the green bias factor used during pixel transfers. The initial value is 0. |
GL_GREEN_BITS | params returns one value, the number of green bitplanes in each color buffer. |
GL_GREEN_SCALE | params returns one value, the green scale factor
used during pixel transfers. The initial value is 1. See |
GL_HISTOGRAM | params returns a single boolean value indicating
whether histogram is enabled. The initial value is |
GL_INDEX_ARRAY | params returns a single boolean value indicating
whether the color index array is enabled. The initial value is |
GL_INDEX_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the color index array. This buffer
object would have been bound to the target |
GL_INDEX_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive color indexes in the color index array. The initial value
is 0. See |
GL_INDEX_ARRAY_TYPE | params returns one value, the data type of indexes
in the color index array. The initial value is |
GL_INDEX_BITS | params returns one value, the number of bitplanes in each color index buffer. |
GL_INDEX_CLEAR_VALUE | params returns one value, the color index used to
clear the color index buffers. The initial value is 0. See |
GL_INDEX_LOGIC_OP | params returns a single boolean value indicating
whether a fragment's index values are merged into the framebuffer
using a logical operation. The initial value is |
GL_INDEX_MODE | params returns a single boolean value indicating
whether the GL is in color index mode ( |
GL_INDEX_OFFSET | params returns one value, the offset added to
color and stencil indices during pixel transfers. The initial value is
0. See |
GL_INDEX_SHIFT | params returns one value, the amount that color
and stencil indices are shifted during pixel transfers. The initial
value is 0. See |
GL_INDEX_WRITEMASK | params returns one value, a mask indicating which
bitplanes of each color index buffer can be written. The initial value
is all 1's. See |
| GL_LIGHTi | params returns a single boolean value indicating
whether the specified light is enabled. The initial value is |
GL_LIGHTING | params returns a single boolean value indicating
whether lighting is enabled. The initial value is |
GL_LIGHT_MODEL_AMBIENT | params returns four values: the red, green, blue,
and alpha components of the ambient intensity of the entire scene.
Integer values, if requested, are linearly mapped from the internal
floating-point representation such that 1.0 returns the most positive
representable integer value, and -1.0 returns the most negative
representable integer value. The initial value is (0.2, 0.2, 0.2,
1.0). See |
GL_LIGHT_MODEL_COLOR_CONTROL | params returns single enumerated value indicating
whether specular reflection calculations are separated from normal
lighting computations. The initial value is |
GL_LIGHT_MODEL_LOCAL_VIEWER | params returns a single boolean value indicating
whether specular reflection calculations treat the viewer as being
local to the scene. The initial value is |
GL_LIGHT_MODEL_TWO_SIDE | params returns a single boolean value indicating
whether separate materials are used to compute lighting for front- and
back-facing polygons. The initial value is |
GL_LINE_SMOOTH | params returns a single boolean value indicating
whether antialiasing of lines is enabled. The initial value is |
GL_LINE_SMOOTH_HINT | params returns one value, a symbolic constant
indicating the mode of the line antialiasing hint. The initial value
is |
GL_LINE_STIPPLE | params returns a single boolean value indicating
whether stippling of lines is enabled. The initial value is |
GL_LINE_STIPPLE_PATTERN | params returns one value, the 16-bit line stipple
pattern. The initial value is all 1's. See |
GL_LINE_STIPPLE_REPEAT | params returns one value, the line stipple repeat
factor. The initial value is 1. See |
GL_LINE_WIDTH | params returns one value, the line width as
specified with |
GL_LINE_WIDTH_GRANULARITY | params returns one value, the width difference
between adjacent supported widths for antialiased lines. See |
GL_LINE_WIDTH_RANGE | params returns two values: the smallest and
largest supported widths for antialiased lines. See |
GL_LIST_BASE | params returns one value, the base offset added to
all names in arrays presented to |
GL_LIST_INDEX | params returns one value, the name of the display
list currently under construction. 0 is returned if no display list is
currently under construction. The initial value is 0. See |
GL_LIST_MODE | params returns one value, a symbolic constant
indicating the construction mode of the display list currently under
construction. The initial value is 0. See |
GL_LOGIC_OP_MODE | params returns one value, a symbolic constant
indicating the selected logic operation mode. The initial value is
|
GL_MAP1_COLOR_4 | params returns a single boolean value indicating
whether 1D evaluation generates colors. The initial value is |
GL_MAP1_GRID_DOMAIN | params returns two values: the endpoints of the 1D
map's grid domain. The initial value is (0, 1). See |
GL_MAP1_GRID_SEGMENTS | params returns one value, the number of partitions
in the 1D map's grid domain. The initial value is 1. See |
GL_MAP1_INDEX | params returns a single boolean value indicating
whether 1D evaluation generates color indices. The initial value is
|
GL_MAP1_NORMAL | params returns a single boolean value indicating
whether 1D evaluation generates normals. The initial value is |
GL_MAP1_TEXTURE_COORD_1 | params returns a single boolean value indicating
whether 1D evaluation generates 1D texture coordinates. The initial
value is |
GL_MAP1_TEXTURE_COORD_2 | params returns a single boolean value indicating
whether 1D evaluation generates 2D texture coordinates. The initial
value is |
GL_MAP1_TEXTURE_COORD_3 | params returns a single boolean value indicating
whether 1D evaluation generates 3D texture coordinates. The initial
value is |
GL_MAP1_TEXTURE_COORD_4 | params returns a single boolean value indicating
whether 1D evaluation generates 4D texture coordinates. The initial
value is |
GL_MAP1_VERTEX_3 | params returns a single boolean value indicating
whether 1D evaluation generates 3D vertex coordinates. The initial
value is |
GL_MAP1_VERTEX_4 | params returns a single boolean value indicating
whether 1D evaluation generates 4D vertex coordinates. The initial
value is |
GL_MAP2_COLOR_4 | params returns a single boolean value indicating
whether 2D evaluation generates colors. The initial value is |
GL_MAP2_GRID_DOMAIN | params returns four values: the endpoints of the
2D map's i and j grid domains. The initial value is
(0,1; 0,1). See |
GL_MAP2_GRID_SEGMENTS | params returns two values: the number of
partitions in the 2D map's i and j grid domains. The
initial value is (1,1). See |
GL_MAP2_INDEX | params returns a single boolean value indicating
whether 2D evaluation generates color indices. The initial value is
|
GL_MAP2_NORMAL | params returns a single boolean value indicating
whether 2D evaluation generates normals. The initial value is |
GL_MAP2_TEXTURE_COORD_1 | params returns a single boolean value indicating
whether 2D evaluation generates 1D texture coordinates. The initial
value is |
GL_MAP2_TEXTURE_COORD_2 | params returns a single boolean value indicating
whether 2D evaluation generates 2D texture coordinates. The initial
value is |
GL_MAP2_TEXTURE_COORD_3 | params returns a single boolean value indicating
whether 2D evaluation generates 3D texture coordinates. The initial
value is |
GL_MAP2_TEXTURE_COORD_4 | params returns a single boolean value indicating
whether 2D evaluation generates 4D texture coordinates. The initial
value is |
GL_MAP2_VERTEX_3 | params returns a single boolean value indicating
whether 2D evaluation generates 3D vertex coordinates. The initial
value is |
GL_MAP2_VERTEX_4 | params returns a single boolean value indicating
whether 2D evaluation generates 4D vertex coordinates. The initial
value is |
GL_MAP_COLOR | params returns a single boolean value indicating
if colors and color indices are to be replaced by table lookup during
pixel transfers. The initial value is |
GL_MAP_STENCIL | params returns a single boolean value indicating
if stencil indices are to be replaced by table lookup during pixel
transfers. The initial value is |
GL_MATRIX_MODE | params returns one value, a symbolic constant
indicating which matrix stack is currently the target of all matrix
operations. The initial value is |
GL_MAX_3D_TEXTURE_SIZE | params returns one value, a rough estimate of the
largest 3D texture that the GL can handle. The value must be at least
16. If the GL version is 1.2 or greater, use |
GL_MAX_CLIENT_ATTRIB_STACK_DEPTH | params returns one value indicating the maximum
supported depth of the client attribute stack. See |
GL_MAX_ATTRIB_STACK_DEPTH | params returns one value, the maximum supported
depth of the attribute stack. The value must be at least 16. See |
GL_MAX_CLIP_PLANES | params returns one value, the maximum number of
application-defined clipping planes. The value must be at least 6. See
|
GL_MAX_COLOR_MATRIX_STACK_DEPTH | params returns one value, the maximum supported
depth of the color matrix stack. The value must be at least 2. See
|
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS | params returns one value, the maximum supported
texture image units that can be used to access texture maps from the
vertex shader and the fragment processor combined. If both the vertex
shader and the fragment processing stage access the same texture image
unit, then that counts as using two texture image units against this
limit. The value must be at least 2. See |
GL_MAX_CUBE_MAP_TEXTURE_SIZE | params returns one value. The value gives a rough
estimate of the largest cube-map texture that the GL can handle. The
value must be at least 16. If the GL version is 1.3 or greater, use
|
GL_MAX_DRAW_BUFFERS | params returns one value, the maximum number of
simultaneous output colors allowed from a fragment shader using the
gl_FragData built-in array. The value must be at least 1. See
|
GL_MAX_ELEMENTS_INDICES | params returns one value, the recommended maximum
number of vertex array indices. See |
GL_MAX_ELEMENTS_VERTICES | params returns one value, the recommended maximum
number of vertex array vertices. See |
GL_MAX_EVAL_ORDER | params returns one value, the maximum equation
order supported by 1D and 2D evaluators. The value must be at least 8.
See |
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS | params returns one value, the maximum number of
individual floating-point, integer, or boolean values that can be held
in uniform variable storage for a fragment shader. The value must be
at least 64. See |
GL_MAX_LIGHTS | params returns one value, the maximum number of
lights. The value must be at least 8. See |
GL_MAX_LIST_NESTING | params returns one value, the maximum recursion
depth allowed during display-list traversal. The value must be at
least 64. See |
GL_MAX_MODELVIEW_STACK_DEPTH | params returns one value, the maximum supported
depth of the modelview matrix stack. The value must be at least 32.
See |
GL_MAX_NAME_STACK_DEPTH | params returns one value, the maximum supported
depth of the selection name stack. The value must be at least 64. See
|
GL_MAX_PIXEL_MAP_TABLE | params returns one value, the maximum supported
size of a |
GL_MAX_PROJECTION_STACK_DEPTH | params returns one value, the maximum supported
depth of the projection matrix stack. The value must be at least 2.
See |
GL_MAX_TEXTURE_COORDS | params returns one value, the maximum number of
texture coordinate sets available to vertex and fragment shaders. The
value must be at least 2. See |
GL_MAX_TEXTURE_IMAGE_UNITS | params returns one value, the maximum supported
texture image units that can be used to access texture maps from the
fragment shader. The value must be at least 2. See |
GL_MAX_TEXTURE_LOD_BIAS | params returns one value, the maximum, absolute value of the texture level-of-detail bias. The value must be at least 4. |
GL_MAX_TEXTURE_SIZE | params returns one value. The value gives a rough
estimate of the largest texture that the GL can handle. The value must
be at least 64. If the GL version is 1.1 or greater, use |
GL_MAX_TEXTURE_STACK_DEPTH | params returns one value, the maximum supported
depth of the texture matrix stack. The value must be at least 2. See
|
GL_MAX_TEXTURE_UNITS | params returns a single value indicating the
number of conventional texture units supported. Each conventional
texture unit includes both a texture coordinate set and a texture
image unit. Conventional texture units may be used for fixed-function
(non-shader) rendering. The value must be at least 2. Additional
texture coordinate sets and texture image units may be accessed from
vertex and fragment shaders. See |
GL_MAX_VARYING_FLOATS | params returns one value, the maximum number of interpolators available for processing varying variables used by vertex and fragment shaders. This value represents the number of individual floating-point values that can be interpolated; varying variables declared as vectors, matrices, and arrays will all consume multiple interpolators. The value must be at least 32. |
GL_MAX_VERTEX_ATTRIBS | params returns one value, the maximum number of
4-component generic vertex attributes accessible to a vertex shader.
The value must be at least 16. See |
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS | params returns one value, the maximum supported
texture image units that can be used to access texture maps from the
vertex shader. The value may be 0. See |
GL_MAX_VERTEX_UNIFORM_COMPONENTS | params returns one value, the maximum number of
individual floating-point, integer, or boolean values that can be held
in uniform variable storage for a vertex shader. The value must be at
least 512. See |
GL_MAX_VIEWPORT_DIMS | params returns two values: the maximum supported
width and height of the viewport. These must be at least as large as
the visible dimensions of the display being rendered to. See |
GL_MINMAX | params returns a single boolean value indicating
whether pixel minmax values are computed. The initial value is |
GL_MODELVIEW_MATRIX | params returns sixteen values: the modelview
matrix on the top of the modelview matrix stack. Initially this matrix
is the identity matrix. See |
GL_MODELVIEW_STACK_DEPTH | params returns one value, the number of matrices
on the modelview matrix stack. The initial value is 1. See |
GL_NAME_STACK_DEPTH | params returns one value, the number of names on
the selection name stack. The initial value is 0. See |
GL_NORMAL_ARRAY | params returns a single boolean value, indicating
whether the normal array is enabled. The initial value is |
GL_NORMAL_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the normal array. This buffer object
would have been bound to the target |
GL_NORMAL_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive normals in the normal array. The initial value is 0. See
|
GL_NORMAL_ARRAY_TYPE | params returns one value, the data type of each
coordinate in the normal array. The initial value is |
GL_NORMALIZE | params returns a single boolean value indicating
whether normals are automatically scaled to unit length after they
have been transformed to eye coordinates. The initial value is |
GL_NUM_COMPRESSED_TEXTURE_FORMATS | params returns a single integer value indicating
the number of available compressed texture formats. The minimum value
is 0. See |
GL_PACK_ALIGNMENT | params returns one value, the byte alignment used
for writing pixel data to memory. The initial value is 4. See |
GL_PACK_IMAGE_HEIGHT | params returns one value, the image height used
for writing pixel data to memory. The initial value is 0. See |
GL_PACK_LSB_FIRST | params returns a single boolean value indicating
whether single-bit pixels being written to memory are written first to
the least significant bit of each unsigned byte. The initial value is
|
GL_PACK_ROW_LENGTH | params returns one value, the row length used for
writing pixel data to memory. The initial value is 0. See |
GL_PACK_SKIP_IMAGES | params returns one value, the number of pixel
images skipped before the first pixel is written into memory. The
initial value is 0. See |
GL_PACK_SKIP_PIXELS | params returns one value, the number of pixel
locations skipped before the first pixel is written into memory. The
initial value is 0. See |
GL_PACK_SKIP_ROWS | params returns one value, the number of rows of
pixel locations skipped before the first pixel is written into memory.
The initial value is 0. See |
GL_PACK_SWAP_BYTES | params returns a single boolean value indicating
whether the bytes of two-byte and four-byte pixel indices and
components are swapped before being written to memory. The initial
value is |
GL_PERSPECTIVE_CORRECTION_HINT | params returns one value, a symbolic constant
indicating the mode of the perspective correction hint. The initial
value is |
GL_PIXEL_MAP_A_TO_A_SIZE | params returns one value, the size of the
alpha-to-alpha pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_B_TO_B_SIZE | params returns one value, the size of the
blue-to-blue pixel translation table. The initial value is 1. See |
GL_PIXEL_MAP_G_TO_G_SIZE | params returns one value, the size of the
green-to-green pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_I_TO_A_SIZE | params returns one value, the size of the
index-to-alpha pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_I_TO_B_SIZE | params returns one value, the size of the
index-to-blue pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_I_TO_G_SIZE | params returns one value, the size of the
index-to-green pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_I_TO_I_SIZE | params returns one value, the size of the
index-to-index pixel translation table. The initial value is 1. See
|
GL_PIXEL_MAP_I_TO_R_SIZE | params returns one value, the size of the
index-to-red pixel translation table. The initial value is 1. See |
GL_PIXEL_MAP_R_TO_R_SIZE | params returns one value, the size of the
red-to-red pixel translation table. The initial value is 1. See |
GL_PIXEL_MAP_S_TO_S_SIZE | params returns one value, the size of the
stencil-to-stencil pixel translation table. The initial value is 1.
See |
GL_PIXEL_PACK_BUFFER_BINDING | params returns a single value, the name of the
buffer object currently bound to the target |
GL_PIXEL_UNPACK_BUFFER_BINDING | params returns a single value, the name of the
buffer object currently bound to the target |
GL_POINT_DISTANCE_ATTENUATION | params returns three values, the coefficients for
computing the attenuation value for points. See |
GL_POINT_FADE_THRESHOLD_SIZE | params returns one value, the point size threshold
for determining the point size. See |
GL_POINT_SIZE | params returns one value, the point size as
specified by |
GL_POINT_SIZE_GRANULARITY | params returns one value, the size difference
between adjacent supported sizes for antialiased points. See |
GL_POINT_SIZE_MAX | params returns one value, the upper bound for the
attenuated point sizes. The initial value is 0.0. See |
GL_POINT_SIZE_MIN | params returns one value, the lower bound for the
attenuated point sizes. The initial value is 1.0. See |
GL_POINT_SIZE_RANGE | params returns two values: the smallest and
largest supported sizes for antialiased points. The smallest size must
be at most 1, and the largest size must be at least 1. See |
GL_POINT_SMOOTH | params returns a single boolean value indicating
whether antialiasing of points is enabled. The initial value is |
GL_POINT_SMOOTH_HINT | params returns one value, a symbolic constant
indicating the mode of the point antialiasing hint. The initial value
is |
GL_POINT_SPRITE | params returns a single boolean value indicating
whether point sprite is enabled. The initial value is |
GL_POLYGON_MODE | params returns two values: symbolic constants
indicating whether front-facing and back-facing polygons are
rasterized as points, lines, or filled polygons. The initial value is
|
GL_POLYGON_OFFSET_FACTOR | params returns one value, the scaling factor used
to determine the variable offset that is added to the depth value of
each fragment generated when a polygon is rasterized. The initial
value is 0. See |
GL_POLYGON_OFFSET_UNITS | params returns one value. This value is multiplied
by an implementation-specific value and then added to the depth value
of each fragment generated when a polygon is rasterized. The initial
value is 0. See |
GL_POLYGON_OFFSET_FILL | params returns a single boolean value indicating
whether polygon offset is enabled for polygons in fill mode. The
initial value is |
GL_POLYGON_OFFSET_LINE | params returns a single boolean value indicating
whether polygon offset is enabled for polygons in line mode. The
initial value is |
GL_POLYGON_OFFSET_POINT | params returns a single boolean value indicating
whether polygon offset is enabled for polygons in point mode. The
initial value is |
GL_POLYGON_SMOOTH | params returns a single boolean value indicating
whether antialiasing of polygons is enabled. The initial value is |
GL_POLYGON_SMOOTH_HINT | params returns one value, a symbolic constant
indicating the mode of the polygon antialiasing hint. The initial
value is |
GL_POLYGON_STIPPLE | params returns a single boolean value indicating
whether polygon stippling is enabled. The initial value is |
GL_POST_COLOR_MATRIX_COLOR_TABLE | params returns a single boolean value indicating
whether post color matrix transformation lookup is enabled. The
initial value is |
GL_POST_COLOR_MATRIX_RED_BIAS | params returns one value, the red bias factor
applied to RGBA fragments after color matrix transformations. The
initial value is 0. See |
GL_POST_COLOR_MATRIX_GREEN_BIAS | params returns one value, the green bias factor
applied to RGBA fragments after color matrix transformations. The
initial value is 0. See |
GL_POST_COLOR_MATRIX_BLUE_BIAS | params returns one value, the blue bias factor
applied to RGBA fragments after color matrix transformations. The
initial value is 0. See |
GL_POST_COLOR_MATRIX_ALPHA_BIAS | params returns one value, the alpha bias factor
applied to RGBA fragments after color matrix transformations. The
initial value is 0. See |
GL_POST_COLOR_MATRIX_RED_SCALE | params returns one value, the red scale factor
applied to RGBA fragments after color matrix transformations. The
initial value is 1. See |
GL_POST_COLOR_MATRIX_GREEN_SCALE | params returns one value, the green scale factor
applied to RGBA fragments after color matrix transformations. The
initial value is 1. See |
GL_POST_COLOR_MATRIX_BLUE_SCALE | params returns one value, the blue scale factor
applied to RGBA fragments after color matrix transformations. The
initial value is 1. See |
GL_POST_COLOR_MATRIX_ALPHA_SCALE | params returns one value, the alpha scale factor
applied to RGBA fragments after color matrix transformations. The
initial value is 1. See |
GL_POST_CONVOLUTION_COLOR_TABLE | params returns a single boolean value indicating
whether post convolution lookup is enabled. The initial value is |
GL_POST_CONVOLUTION_RED_BIAS | params returns one value, the red bias factor
applied to RGBA fragments after convolution. The initial value is 0.
See |
GL_POST_CONVOLUTION_GREEN_BIAS | params returns one value, the green bias factor
applied to RGBA fragments after convolution. The initial value is 0.
See |
GL_POST_CONVOLUTION_BLUE_BIAS | params returns one value, the blue bias factor
applied to RGBA fragments after convolution. The initial value is 0.
See |
GL_POST_CONVOLUTION_ALPHA_BIAS | params returns one value, the alpha bias factor
applied to RGBA fragments after convolution. The initial value is 0.
See |
GL_POST_CONVOLUTION_RED_SCALE | params returns one value, the red scale factor
applied to RGBA fragments after convolution. The initial value is 1.
See |
GL_POST_CONVOLUTION_GREEN_SCALE | params returns one value, the green scale factor
applied to RGBA fragments after convolution. The initial value is 1.
See |
GL_POST_CONVOLUTION_BLUE_SCALE | params returns one value, the blue scale factor
applied to RGBA fragments after convolution. The initial value is 1.
See |
GL_POST_CONVOLUTION_ALPHA_SCALE | params returns one value, the alpha scale factor
applied to RGBA fragments after convolution. The initial value is 1.
See |
GL_PROJECTION_MATRIX | params returns sixteen values: the projection
matrix on the top of the projection matrix stack. Initially this
matrix is the identity matrix. See |
GL_PROJECTION_STACK_DEPTH | params returns one value, the number of matrices
on the projection matrix stack. The initial value is 1. See |
GL_READ_BUFFER | params returns one value, a symbolic constant
indicating which color buffer is selected for reading. The initial
value is |
GL_RED_BIAS | params returns one value, the red bias factor used during pixel transfers. The initial value is 0. |
GL_RED_BITS | params returns one value, the number of red bitplanes in each color buffer. |
GL_RED_SCALE | params returns one value, the red scale factor
used during pixel transfers. The initial value is 1. See |
GL_RENDER_MODE | params returns one value, a symbolic constant
indicating whether the GL is in render, select, or feedback mode. The
initial value is |
GL_RESCALE_NORMAL | params returns single boolean value indicating
whether normal rescaling is enabled. See |
GL_RGBA_MODE | params returns a single boolean value indicating
whether the GL is in RGBA mode (true) or color index mode (false). See
|
GL_SAMPLE_BUFFERS | params returns a single integer value indicating
the number of sample buffers associated with the framebuffer. See |
GL_SAMPLE_COVERAGE_VALUE | params returns a single positive floating-point
value indicating the current sample coverage value. See |
GL_SAMPLE_COVERAGE_INVERT | params returns a single boolean value indicating
if the temporary coverage value should be inverted. See |
GL_SAMPLES | params returns a single integer value indicating
the coverage mask size. See |
GL_SCISSOR_BOX | params returns four values: the x and y window coordinates of the scissor box, followed by its width
and height. Initially the x and y window coordinates are
both 0 and the width and height are set to the size of the window. See
|
GL_SCISSOR_TEST | params returns a single boolean value indicating
whether scissoring is enabled. The initial value is |
GL_SECONDARY_COLOR_ARRAY | params returns a single boolean value indicating
whether the secondary color array is enabled. The initial value is
|
GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the secondary color array. This buffer
object would have been bound to the target |
GL_SECONDARY_COLOR_ARRAY_SIZE | params returns one value, the number of components
per color in the secondary color array. The initial value is 3. See
|
GL_SECONDARY_COLOR_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive colors in the secondary color array. The initial value is
0. See |
GL_SECONDARY_COLOR_ARRAY_TYPE | params returns one value, the data type of each
component in the secondary color array. The initial value is |
GL_SELECTION_BUFFER_SIZE | params return one value, the size of the selection
buffer. See |
GL_SEPARABLE_2D | params returns a single boolean value indicating
whether 2D separable convolution is enabled. The initial value is |
GL_SHADE_MODEL | params returns one value, a symbolic constant
indicating whether the shading mode is flat or smooth. The initial
value is |
GL_SMOOTH_LINE_WIDTH_RANGE | params returns two values, the smallest and
largest supported widths for antialiased lines. See |
GL_SMOOTH_LINE_WIDTH_GRANULARITY | params returns one value, the granularity of
widths for antialiased lines. See |
GL_SMOOTH_POINT_SIZE_RANGE | params returns two values, the smallest and
largest supported widths for antialiased points. See |
GL_SMOOTH_POINT_SIZE_GRANULARITY | params returns one value, the granularity of sizes
for antialiased points. See |
GL_STENCIL_BACK_FAIL | params returns one value, a symbolic constant
indicating what action is taken for back-facing polygons when the
stencil test fails. The initial value is |
GL_STENCIL_BACK_FUNC | params returns one value, a symbolic constant
indicating what function is used for back-facing polygons to compare
the stencil reference value with the stencil buffer value. The initial
value is |
GL_STENCIL_BACK_PASS_DEPTH_FAIL | params returns one value, a symbolic constant
indicating what action is taken for back-facing polygons when the
stencil test passes, but the depth test fails. The initial value is
|
GL_STENCIL_BACK_PASS_DEPTH_PASS | params returns one value, a symbolic constant
indicating what action is taken for back-facing polygons when the
stencil test passes and the depth test passes. The initial value is
|
GL_STENCIL_BACK_REF | params returns one value, the reference value that
is compared with the contents of the stencil buffer for back-facing
polygons. The initial value is 0. See |
GL_STENCIL_BACK_VALUE_MASK | params returns one value, the mask that is used
for back-facing polygons to mask both the stencil reference value and
the stencil buffer value before they are compared. The initial value
is all 1's. See |
GL_STENCIL_BACK_WRITEMASK | params returns one value, the mask that controls
writing of the stencil bitplanes for back-facing polygons. The initial
value is all 1's. See |
GL_STENCIL_BITS | params returns one value, the number of bitplanes in the stencil buffer. |
GL_STENCIL_CLEAR_VALUE | params returns one value, the index to which the
stencil bitplanes are cleared. The initial value is 0. See |
GL_STENCIL_FAIL | params returns one value, a symbolic constant
indicating what action is taken when the stencil test fails. The
initial value is |
GL_STENCIL_FUNC | params returns one value, a symbolic constant
indicating what function is used to compare the stencil reference
value with the stencil buffer value. The initial value is |
GL_STENCIL_PASS_DEPTH_FAIL | params returns one value, a symbolic constant
indicating what action is taken when the stencil test passes, but the
depth test fails. The initial value is |
GL_STENCIL_PASS_DEPTH_PASS | params returns one value, a symbolic constant
indicating what action is taken when the stencil test passes and the
depth test passes. The initial value is |
GL_STENCIL_REF | params returns one value, the reference value that
is compared with the contents of the stencil buffer. The initial value
is 0. See |
GL_STENCIL_TEST | params returns a single boolean value indicating
whether stencil testing of fragments is enabled. The initial value is
|
GL_STENCIL_VALUE_MASK | params returns one value, the mask that is used to
mask both the stencil reference value and the stencil buffer value
before they are compared. The initial value is all 1's. See |
GL_STENCIL_WRITEMASK | params returns one value, the mask that controls
writing of the stencil bitplanes. The initial value is all 1's. See
|
GL_STEREO | params returns a single boolean value indicating whether stereo buffers (left and right) are supported. |
GL_SUBPIXEL_BITS | params returns one value, an estimate of the number of bits of subpixel resolution that are used to position rasterized geometry in window coordinates. The value must be at least 4. |
GL_TEXTURE_1D | params returns a single boolean value indicating
whether 1D texture mapping is enabled. The initial value is |
GL_TEXTURE_BINDING_1D | params returns a single value, the name of the
texture currently bound to the target |
GL_TEXTURE_2D | params returns a single boolean value indicating
whether 2D texture mapping is enabled. The initial value is |
GL_TEXTURE_BINDING_2D | params returns a single value, the name of the
texture currently bound to the target |
GL_TEXTURE_3D | params returns a single boolean value indicating
whether 3D texture mapping is enabled. The initial value is |
GL_TEXTURE_BINDING_3D | params returns a single value, the name of the
texture currently bound to the target |
GL_TEXTURE_BINDING_CUBE_MAP | params returns a single value, the name of the
texture currently bound to the target |
GL_TEXTURE_COMPRESSION_HINT | params returns a single value indicating the mode
of the texture compression hint. The initial value is |
GL_TEXTURE_COORD_ARRAY | params returns a single boolean value indicating
whether the texture coordinate array is enabled. The initial value is
|
GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the texture coordinate array. This
buffer object would have been bound to the target |
GL_TEXTURE_COORD_ARRAY_SIZE | params returns one value, the number of
coordinates per element in the texture coordinate array. The initial
value is 4. See |
GL_TEXTURE_COORD_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive elements in the texture coordinate array. The initial
value is 0. See |
GL_TEXTURE_COORD_ARRAY_TYPE | params returns one value, the data type of the
coordinates in the texture coordinate array. The initial value is |
GL_TEXTURE_CUBE_MAP | params returns a single boolean value indicating
whether cube-mapped texture mapping is enabled. The initial value is
|
GL_TEXTURE_GEN_Q | params returns a single boolean value indicating
whether automatic generation of the q texture coordinate is
enabled. The initial value is |
GL_TEXTURE_GEN_R | params returns a single boolean value indicating
whether automatic generation of the r texture coordinate is
enabled. The initial value is |
GL_TEXTURE_GEN_S | params returns a single boolean value indicating
whether automatic generation of the S texture coordinate is
enabled. The initial value is |
GL_TEXTURE_GEN_T | params returns a single boolean value indicating
whether automatic generation of the T texture coordinate is enabled.
The initial value is |
GL_TEXTURE_MATRIX | params returns sixteen values: the texture matrix
on the top of the texture matrix stack. Initially this matrix is the
identity matrix. See |
GL_TEXTURE_STACK_DEPTH | params returns one value, the number of matrices
on the texture matrix stack. The initial value is 1. See |
GL_TRANSPOSE_COLOR_MATRIX | params returns 16 values, the elements of the
color matrix in row-major order. See |
GL_TRANSPOSE_MODELVIEW_MATRIX | params returns 16 values, the elements of the
modelview matrix in row-major order. See |
GL_TRANSPOSE_PROJECTION_MATRIX | params returns 16 values, the elements of the
projection matrix in row-major order. See |
GL_TRANSPOSE_TEXTURE_MATRIX | params returns 16 values, the elements of the
texture matrix in row-major order. See |
GL_UNPACK_ALIGNMENT | params returns one value, the byte alignment used
for reading pixel data from memory. The initial value is 4. See |
GL_UNPACK_IMAGE_HEIGHT | params returns one value, the image height used
for reading pixel data from memory. The initial is 0. See |
GL_UNPACK_LSB_FIRST | params returns a single boolean value indicating
whether single-bit pixels being read from memory are read first from
the least significant bit of each unsigned byte. The initial value is
|
GL_UNPACK_ROW_LENGTH | params returns one value, the row length used for
reading pixel data from memory. The initial value is 0. See |
GL_UNPACK_SKIP_IMAGES | params returns one value, the number of pixel
images skipped before the first pixel is read from memory. The initial
value is 0. See |
GL_UNPACK_SKIP_PIXELS | params returns one value, the number of pixel
locations skipped before the first pixel is read from memory. The
initial value is 0. See |
GL_UNPACK_SKIP_ROWS | params returns one value, the number of rows of
pixel locations skipped before the first pixel is read from memory.
The initial value is 0. See |
GL_UNPACK_SWAP_BYTES | params returns a single boolean value indicating
whether the bytes of two-byte and four-byte pixel indices and
components are swapped after being read from memory. The initial value
is |
GL_VERTEX_ARRAY | params returns a single boolean value indicating
whether the vertex array is enabled. The initial value is |
GL_VERTEX_ARRAY_BUFFER_BINDING | params returns a single value, the name of the
buffer object associated with the vertex array. This buffer object
would have been bound to the target |
GL_VERTEX_ARRAY_SIZE | params returns one value, the number of
coordinates per vertex in the vertex array. The initial value is 4.
See |
GL_VERTEX_ARRAY_STRIDE | params returns one value, the byte offset between
consecutive vertices in the vertex array. The initial value is 0. See
|
GL_VERTEX_ARRAY_TYPE | params returns one value, the data type of each
coordinate in the vertex array. The initial value is |
GL_VERTEX_PROGRAM_POINT_SIZE | params returns a single boolean value indicating
whether vertex program point size mode is enabled. If enabled, and a
vertex shader is active, then the point size is taken from the shader
built-in gl_PointSize. If disabled, and a vertex shader is
active, then the point size is taken from the point state as specified
by |
GL_VERTEX_PROGRAM_TWO_SIDE | params returns a single boolean value indicating
whether vertex program two-sided color mode is enabled. If enabled,
and a vertex shader is active, then the GL chooses the back color
output for back-facing polygons, and the front color output for
non-polygons and front-facing polygons. If disabled, and a vertex
shader is active, then the front color output is always selected. The
initial value is |
GL_VIEWPORT | params returns four values: the x and y window coordinates of the viewport, followed by its width and
height. Initially the x and y window coordinates are
both set to 0, and the width and height are set to the width and
height of the window into which the GL will do its rendering. See |
GL_ZOOM_X | params returns one value, the x pixel zoom
factor. The initial value is 1. See |
GL_ZOOM_Y | params returns one value, the y pixel zoom
factor. The initial value is 1. See |
glIsEnabled.
pnameSpecifies the parameter value to be returned. The symbolic constants in the list below are accepted.
paramsReturns the value or values of the specified parameter.
GL_INVALID_ENUM is generated if pname is not an accepted
value.
GL_INVALID_OPERATION is generated if glGet is executed between
the execution of glBegin and the corresponding execution of
glEnd.
GL_COLOR_LOGIC_OP, GL_COLOR_ARRAY, GL_COLOR_ARRAY_SIZE,
GL_COLOR_ARRAY_STRIDE, GL_COLOR_ARRAY_TYPE,
GL_EDGE_FLAG_ARRAY, GL_EDGE_FLAG_ARRAY_STRIDE,
GL_INDEX_ARRAY, GL_INDEX_ARRAY_STRIDE, GL_INDEX_ARRAY_TYPE,
GL_INDEX_LOGIC_OP, GL_NORMAL_ARRAY, GL_NORMAL_ARRAY_STRIDE,
GL_NORMAL_ARRAY_TYPE, GL_POLYGON_OFFSET_UNITS,
GL_POLYGON_OFFSET_FACTOR, GL_POLYGON_OFFSET_FILL,
GL_POLYGON_OFFSET_LINE, GL_POLYGON_OFFSET_POINT,
GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_COORD_ARRAY_SIZE,
GL_TEXTURE_COORD_ARRAY_STRIDE, GL_TEXTURE_COORD_ARRAY_TYPE,
GL_VERTEX_ARRAY, GL_VERTEX_ARRAY_SIZE,
GL_VERTEX_ARRAY_STRIDE, and GL_VERTEX_ARRAY_TYPE are available
only if the GL version is 1.1 or greater.
GL_ALIASED_POINT_SIZE_RANGE, GL_FEEDBACK_BUFFER_SIZE,
GL_FEEDBACK_BUFFER_TYPE, GL_LIGHT_MODEL_AMBIENT,
GL_LIGHT_MODEL_COLOR_CONTROL, GL_MAX_3D_TEXTURE_SIZE,
GL_MAX_ELEMENTS_INDICES, GL_MAX_ELEMENTS_VERTICES,
GL_PACK_IMAGE_HEIGHT, GL_PACK_SKIP_IMAGES, GL_RESCALE_NORMAL,
GL_SELECTION_BUFFER_SIZE, GL_SMOOTH_LINE_WIDTH_GRANULARITY,
GL_SMOOTH_LINE_WIDTH_RANGE, GL_SMOOTH_POINT_SIZE_GRANULARITY,
GL_SMOOTH_POINT_SIZE_RANGE, GL_TEXTURE_3D,
GL_TEXTURE_BINDING_3D, GL_UNPACK_IMAGE_HEIGHT, and
GL_UNPACK_SKIP_IMAGES are available only if the GL version is 1.2
or greater.
GL_COMPRESSED_TEXTURE_FORMATS,
GL_NUM_COMPRESSED_TEXTURE_FORMATS, GL_TEXTURE_BINDING_CUBE_MAP,
and GL_TEXTURE_COMPRESSION_HINT are available only if the GL
version is 1.3 or greater.
GL_BLEND_DST_ALPHA, GL_BLEND_DST_RGB, GL_BLEND_SRC_ALPHA,
GL_BLEND_SRC_RGB, GL_CURRENT_FOG_COORD,
GL_CURRENT_SECONDARY_COLOR, GL_FOG_COORD_ARRAY_STRIDE,
GL_FOG_COORD_ARRAY_TYPE, GL_FOG_COORD_SRC,
GL_MAX_TEXTURE_LOD_BIAS, GL_POINT_SIZE_MIN,
GL_POINT_SIZE_MAX, GL_POINT_FADE_THRESHOLD_SIZE,
GL_POINT_DISTANCE_ATTENUATION, GL_SECONDARY_COLOR_ARRAY_SIZE,
GL_SECONDARY_COLOR_ARRAY_STRIDE, and
GL_SECONDARY_COLOR_ARRAY_TYPE are available only if the GL version
is 1.4 or greater.
GL_ARRAY_BUFFER_BINDING, GL_COLOR_ARRAY_BUFFER_BINDING,
GL_EDGE_FLAG_ARRAY_BUFFER_BINDING,
GL_ELEMENT_ARRAY_BUFFER_BINDING,
GL_FOG_COORD_ARRAY_BUFFER_BINDING,
GL_INDEX_ARRAY_BUFFER_BINDING, GL_NORMAL_ARRAY_BUFFER_BINDING,
GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING,
GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING, and
GL_VERTEX_ARRAY_BUFFER_BINDING are available only if the GL version
is 1.5 or greater.
GL_BLEND_EQUATION_ALPHA, GL_BLEND_EQUATION_RGB,
GL_DRAW_BUFFERi, GL_FRAGMENT_SHADER_DERIVATIVE_HINT,
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, GL_MAX_DRAW_BUFFERS,
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, GL_MAX_TEXTURE_COORDS,
GL_MAX_TEXTURE_IMAGE_UNITS, GL_MAX_VARYING_FLOATS,
GL_MAX_VERTEX_ATTRIBS, GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS,
GL_MAX_VERTEX_UNIFORM_COMPONENTS, GL_POINT_SPRITE,
GL_STENCIL_BACK_FAIL, GL_STENCIL_BACK_FUNC,
GL_STENCIL_BACK_PASS_DEPTH_FAIL,
GL_STENCIL_BACK_PASS_DEPTH_PASS, GL_STENCIL_BACK_REF,
GL_STENCIL_BACK_VALUE_MASK, GL_STENCIL_BACK_WRITEMASK,
GL_VERTEX_PROGRAM_POINT_SIZE, and GL_VERTEX_PROGRAM_TWO_SIDE are
available only if the GL version is 2.0 or greater.
GL_CURRENT_RASTER_SECONDARY_COLOR, GL_PIXEL_PACK_BUFFER_BINDING
and GL_PIXEL_UNPACK_BUFFER_BINDING are available only if the GL
version is 2.1 or greater.
GL_LINE_WIDTH_GRANULARITY was deprecated in GL version 1.2. Its
functionality was replaced by GL_SMOOTH_LINE_WIDTH_GRANULARITY.
GL_LINE_WIDTH_RANGE was deprecated in GL version 1.2. Its
functionality was replaced by GL_SMOOTH_LINE_WIDTH_RANGE.
GL_POINT_SIZE_GRANULARITY was deprecated in GL version 1.2. Its
functionality was replaced by GL_SMOOTH_POINT_SIZE_GRANULARITY.
GL_POINT_SIZE_RANGE was deprecated in GL version 1.2. Its
functionality was replaced by GL_SMOOTH_POINT_SIZE_RANGE.
GL_BLEND_EQUATION was deprecated in GL version 2.0. Its
functionality was replaced by GL_BLEND_EQUATION_RGB and
GL_BLEND_EQUATION_ALPHA.
GL_COLOR_MATRIX, GL_COLOR_MATRIX_STACK_DEPTH, GL_COLOR_TABLE,
GL_CONVOLUTION_1D, GL_CONVOLUTION_2D, GL_HISTOGRAM,
GL_MAX_COLOR_MATRIX_STACK_DEPTH, GL_MINMAX,
GL_POST_COLOR_MATRIX_COLOR_TABLE, GL_POST_COLOR_MATRIX_RED_BIAS,
GL_POST_COLOR_MATRIX_GREEN_BIAS, GL_POST_COLOR_MATRIX_BLUE_BIAS,
GL_POST_COLOR_MATRIX_ALPHA_BIAS, GL_POST_COLOR_MATRIX_RED_SCALE,
GL_POST_COLOR_MATRIX_GREEN_SCALE,
GL_POST_COLOR_MATRIX_BLUE_SCALE,
GL_POST_COLOR_MATRIX_ALPHA_SCALE,
GL_POST_CONVOLUTION_COLOR_TABLE, GL_POST_CONVOLUTION_RED_BIAS,
GL_POST_CONVOLUTION_GREEN_BIAS, GL_POST_CONVOLUTION_BLUE_BIAS,
GL_POST_CONVOLUTION_ALPHA_BIAS, GL_POST_CONVOLUTION_RED_SCALE,
GL_POST_CONVOLUTION_GREEN_SCALE, GL_POST_CONVOLUTION_BLUE_SCALE,
GL_POST_CONVOLUTION_ALPHA_SCALE, and GL_SEPARABLE_2D are
available only if ARB_imaging is returned from glGet when
called with the argument GL_EXTENSIONS.
When the ARB_multitexture extension is supported, or the GL
version is 1.3 or greater, the following parameters return the
associated value for the active texture unit:
GL_CURRENT_RASTER_TEXTURE_COORDS, GL_TEXTURE_1D,
GL_TEXTURE_BINDING_1D, GL_TEXTURE_2D, GL_TEXTURE_BINDING_2D,
GL_TEXTURE_3D, GL_TEXTURE_BINDING_3D, GL_TEXTURE_GEN_S,
GL_TEXTURE_GEN_T, GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q,
GL_TEXTURE_MATRIX, and GL_TEXTURE_STACK_DEPTH. Likewise, the
following parameters return the associated value for the active client
texture unit: GL_TEXTURE_COORD_ARRAY,
GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,
GL_TEXTURE_COORD_ARRAY_SIZE, GL_TEXTURE_COORD_ARRAY_STRIDE,
GL_TEXTURE_COORD_ARRAY_TYPE.
glGetActiveAttrib, glGetActiveUniform, glGetAttachedShaders,
glGetAttribLocation, glGetBufferParameteriv,
glGetBufferPointerv, glGetBufferSubData, glGetClipPlane,
glGetColorTable, glGetColorTableParameter,
glGetCompressedTexImage, glGetConvolutionFilter,
glGetConvolutionParameter, glGetError, glGetHistogram,
glGetHistogramParameter, glGetLight, glGetMap,
glGetMaterial, glGetMinmax, glGetMinmaxParameter,
glGetPixelMap, glGetPointerv, glGetPolygonStipple,
glGetProgram, glGetProgramInfoLog, glGetQueryiv,
glGetQueryObject, glGetSeparableFilter, glGetShader,
glGetShaderInfoLog, glGetShaderSource, glGetString,
glGetTexEnv, glGetTexGen, glGetTexImage,
glGetTexLevelParameter, glGetTexParameter, glGetUniform,
glGetUniformLocation, glGetVertexAttrib,
glGetVertexAttribPointerv, glIsEnabled
int glGetError()
glGetError returns the value of the error flag. Each detectable
error is assigned a numeric code and symbolic name. When an error
occurs, the error flag is set to the appropriate error code value. No
other errors are recorded until glGetError is called, the error
code is returned, and the flag is reset to GL_NO_ERROR. If a call
to glGetError returns GL_NO_ERROR, there has been no detectable
error since the last call to glGetError, or since the GL was
initialized.
To allow for distributed implementations, there may be several error
flags. If any single error flag has recorded an error, the value of
that flag is returned and that flag is reset to GL_NO_ERROR when
glGetError is called. If more than one flag has recorded an error,
glGetError returns and clears an arbitrary error flag value. Thus,
glGetError should always be called in a loop, until it returns
GL_NO_ERROR, if all error flags are to be reset.
Initially, all error flags are set to GL_NO_ERROR.
The following errors are currently defined:
GL_NO_ERROR | No error has been recorded. The value of this symbolic constant is guaranteed to be 0. |
GL_INVALID_ENUM | An unacceptable value is specified for an enumerated argument. The offending command is ignored and has no other side effect than to set the error flag. |
GL_INVALID_VALUE | A numeric argument is out of range. The offending command is ignored and has no other side effect than to set the error flag. |
GL_INVALID_OPERATION | The specified operation is not allowed in the current state. The offending command is ignored and has no other side effect than to set the error flag. |
GL_STACK_OVERFLOW | This command would cause a stack overflow. The offending command is ignored and has no other side effect than to set the error flag. |
GL_STACK_UNDERFLOW | This command would cause a stack underflow. The offending command is ignored and has no other side effect than to set the error flag. |
GL_OUT_OF_MEMORY | There is not enough memory left to execute the command. The state of the GL is undefined, except for the state of the error flags, after this error is recorded. |
GL_TABLE_TOO_LARGE | The specified table exceeds the implementation's maximum supported table size. The offending command is ignored and has no other side effect than to set the error flag. |
GL_OUT_OF_MEMORY has occurred. In all other
cases, the command generating the error is ignored and has no effect
on the GL state or frame buffer contents. If the generating command
returns a value, it returns 0. If glGetError itself generates an
error, it returns 0.
GL_INVALID_OPERATION is generated if glGetError is executed
between the execution of glBegin and the corresponding execution of
glEnd. In this case, glGetError returns 0.
GL_TABLE_TOO_LARGE was introduced in GL version 1.2.
string glGetString(int name)
glGetString returns a pointer to a static string describing some
aspect of the current GL connection. name can be one of the
following:
GL_VENDOR | Returns the company responsible for this GL implementation. This name does not change from release to release. |
GL_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. |
GL_VERSION | Returns a version or release number. |
GL_SHADING_LANGUAGE_VERSION | Returns a version or release number for the shading language. |
GL_EXTENSIONS | Returns a space-separated list of supported extensions to GL. |
GL_VENDOR
and GL_RENDERER together uniquely specify a platform. They do not
change from release to release and should be used by
platform-recognition algorithms.
Some applications want to make use of features that are not part of
the standard GL. These features may be implemented as extensions to
the standard GL. The GL_EXTENSIONS string is a space-separated list
of supported GL extensions. (Extension names never contain a space
character.)
The GL_VERSION and GL_SHADING_LANGUAGE_VERSION strings begin
with a version number. The version number uses one of these forms:
major_number.minor_numbermajor_number.minor_number.release_number
Vendor-specific information may follow the version number. Its format depends on the implementation, but a space always separates the version number and the vendor-specific information.
All strings are null-terminated.
nameSpecifies a symbolic constant, one of GL_VENDOR, GL_RENDERER,
GL_VERSION, GL_SHADING_LANGUAGE_VERSION, or GL_EXTENSIONS.
GL_INVALID_ENUM is generated if name is not an accepted value.
GL_INVALID_OPERATION is generated if glGetString is executed
between the execution of glBegin and the corresponding execution of
glEnd.
If an error is generated, glGetString returns 0.
The client and server may support different versions or extensions.
glGetString always returns a compatible version number or list of
extensions. The release number always describes the server.
GL_SHADING_LANGUAGE_VERSION is available only if the GL version is
2.0 or greater.
void glGetTexImage(int target, int level, int format, int type, System.Memory img)
glGetTexImage returns a texture image into img. target
specifies whether the desired texture image is one specified by
glTexImage1D (GL_TEXTURE_1D), glTexImage2D (GL_TEXTURE_2D
or any of GL_TEXTURE_CUBE_MAP_*), or glTexImage3D
(GL_TEXTURE_3D). level specifies the level-of-detail number of
the desired image. format and type specify the format and
type of the desired image array. See the reference pages
glTexImage1D and glDrawPixels for a description of the
acceptable values for the format and type parameters,
respectively.
If a non-zero named buffer object is bound to the
GL_PIXEL_PACK_BUFFER target (see glBindBuffer) while a texture
image is requested, img is treated as a byte offset into the
buffer object's data store.
To understand the operation of glGetTexImage, consider the selected
internal four-component texture image to be an RGBA color buffer the
size of the image. The semantics of glGetTexImage are then
identical to those of glReadPixels, with the exception that no
pixel transfer operations are performed, when called with the same
format and type, with x and y set to 0, width
set to the width of the texture image (including border if one was
specified), and height set to 1 for 1D images, or to the height
of the texture image (including border if one was specified) for 2D
images. Because the internal texture image is an RGBA image, pixel
formats GL_COLOR_INDEX, GL_STENCIL_INDEX, and
GL_DEPTH_COMPONENT are not accepted, and pixel type GL_BITMAP is
not accepted.
If the selected texture image does not contain four components, the following mappings are applied. Single-component textures are treated as RGBA buffers with red set to the single-component value, green set to 0, blue set to 0, and alpha set to 1. Two-component textures are treated as RGBA buffers with red set to the value of component zero, alpha set to the value of component one, and green and blue set to 0. Finally, three-component textures are treated as RGBA buffers with red set to component zero, green set to component one, blue set to component two, and alpha set to 1.
To determine the required size of img, use
glGetTexLevelParameter to determine the dimensions of the internal
texture image, then scale the required number of pixels by the storage
required for each pixel, based on format and type. Be sure
to take the pixel storage parameters into account, especially
GL_PACK_ALIGNMENT.
targetSpecifies which texture is to be obtained. GL_TEXTURE_1D,
GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
and GL_TEXTURE_CUBE_MAP_NEGATIVE_Z are accepted.
levelSpecifies the level-of-detail number of the desired image. Level 0 is the base image level. Level n is the nth mipmap reduction image.
formatSpecifies a pixel format for the returned data. The supported formats
are GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB,
GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and
GL_LUMINANCE_ALPHA.
typeSpecifies a pixel type for the returned data. The supported types are
GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT,
GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2,
GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
GL_UNSIGNED_INT_2_10_10_10_REV.
imgReturns the texture image. Should be an array of the type specified by type.
GL_INVALID_ENUM is generated if target, format, or
type is not an accepted value.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2(max)
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_OPERATION is returned if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is returned if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV,
and format is neither GL_RGBA or GL_BGRA.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and the buffer object's
data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and the data would be
packed to the buffer object such that the memory writes required would
exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and img is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glGetTexImage is executed
between the execution of glBegin and the corresponding execution of
glEnd.
If an error is generated, no change is made to the contents of img.
The types GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, GL_UNSIGNED_INT_2_10_10_10_REV, and
the formats GL_BGR, and GL_BGRA are available only if the GL
version is 1.2 or greater.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glGetTexImage
returns the texture image for the active texture unit.
glActiveTexture, glDrawPixels, glReadPixels, glTexEnv,
glTexGen, glTexImage1D, glTexImage2D, glTexImage3D,
glTexSubImage1D, glTexSubImage2D, glTexSubImage3D,
glTexParameter
void glHint(int target, int mode)
Certain aspects of GL behavior, when there is room for interpretation,
can be controlled with hints. A hint is specified with two arguments.
target is a symbolic constant indicating the behavior to be
controlled, and mode is another symbolic constant indicating the
desired behavior. The initial value for each target is
GL_DONT_CARE. mode can be one of the following:
GL_FASTEST | The most efficient option should be chosen. |
GL_NICEST | The most correct, or highest quality, option should be chosen. |
GL_DONT_CARE | No preference. |
GL_FOG_HINT | Indicates the accuracy of fog calculation. If per-pixel
fog calculation is not efficiently supported by the GL implementation,
hinting |
GL_FRAGMENT_SHADER_DERIVATIVE_HINT | Indicates the accuracy of the derivative calculation for the GL shading language fragment processing built-in functions: dFdx, dFdy, and fwidth. |
GL_GENERATE_MIPMAP_HINT | Indicates the quality of filtering when generating mipmap images. |
GL_LINE_SMOOTH_HINT | Indicates the sampling quality of antialiased lines. If a
larger filter function is applied, hinting |
GL_PERSPECTIVE_CORRECTION_HINT | Indicates the quality of color, texture coordinate, and
fog coordinate interpolation. If perspective-corrected parameter
interpolation is not efficiently supported by the GL implementation,
hinting |
GL_POINT_SMOOTH_HINT | Indicates the sampling quality of antialiased points. If
a larger filter function is applied, hinting |
GL_POLYGON_SMOOTH_HINT | Indicates the sampling quality of antialiased polygons.
Hinting |
GL_TEXTURE_COMPRESSION_HINT | Indicates the quality and performance of the compressing
texture images. Hinting |
targetSpecifies a symbolic constant indicating the behavior to be
controlled. GL_FOG_HINT, GL_GENERATE_MIPMAP_HINT,
GL_LINE_SMOOTH_HINT, GL_PERSPECTIVE_CORRECTION_HINT,
GL_POINT_SMOOTH_HINT, GL_POLYGON_SMOOTH_HINT,
GL_TEXTURE_COMPRESSION_HINT, and
GL_FRAGMENT_SHADER_DERIVATIVE_HINT are accepted.
modeSpecifies a symbolic constant indicating the desired behavior.
GL_FASTEST, GL_NICEST, and GL_DONT_CARE are accepted.
GL_INVALID_ENUM is generated if either target or mode is
not an accepted value.
GL_INVALID_OPERATION is generated if glHint is executed between
the execution of glBegin and the corresponding execution of
glEnd.
The interpretation of hints depends on the implementation. Some
implementations ignore glHint settings.
GL_TEXTURE_COMPRESSION_HINT is available only if the GL version is
1.3 or greater.
GL_GENERATE_MIPMAP_HINT is available only if the GL version is 1.4
or greater.
GL_FRAGMENT_SHADER_DERIVATIVE_HINT is available only if the GL
version is 2.0 or greater.
void glIndex(float|int c)
glIndex updates the current (single-valued) color index. It takes
one argument, the new value for the current color index.
The current index is stored as a floating-point value. Integer values are converted directly to floating-point values, with no special mapping. The initial value is 1.
Index values outside the representable range of the color index buffer are not clamped. However, before an index is dithered (if enabled) and written to the frame buffer, it is converted to fixed-point format. Any bits in the integer portion of the resulting fixed-point value that do not correspond to bits in the frame buffer are masked out.
cSpecifies the new value for the current color index.
cSpecifies a pointer to a one-element array that contains the new value for the current color index.
glIndex and glIndex are available only if the GL version is 1.1
or greater.
The current index can be updated at any time. In particular,
glIndex can be called between a call to glBegin and the
corresponding call to glEnd.
glColor, glIndexPointer
void glIndexMask(int mask)
glIndexMask controls the writing of individual bits in the color
index buffers. The least significant n bits of mask, where
n is the number of bits in a color index buffer, specify a mask.
Where a 1 (one) appears in the mask, it's possible to write to the
corresponding bit in the color index buffer (or buffers). Where a 0
(zero) appears, the corresponding bit is write-protected.
This mask is used only in color index mode, and it affects only the
buffers currently selected for writing (see glDrawBuffer).
Initially, all bits are enabled for writing.
maskSpecifies a bit mask to enable and disable the writing of individual bits in the color index buffers. Initially, the mask is all 1's.
GL_INVALID_OPERATION is generated if glIndexMask is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glColorMask, glDepthMask, glDrawBuffer, glIndex,
glIndexPointer, glStencilMask
void glIndexPointer(int type, int stride, System.Memory pointer)
glIndexPointer specifies the location and data format of an array
of color indexes to use when rendering. type specifies the data
type of each color index and stride specifies the byte stride
from one color index to the next, allowing vertices and attributes to
be packed into a single array or stored in separate arrays.
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while a color index array is specified,
pointer is treated as a byte offset into the buffer object's data
store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
saved as color index vertex array client-side state
(GL_INDEX_ARRAY_BUFFER_BINDING).
When a color index array is specified, type, stride, and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the color index array, call
glEnableClientState and glDisableClientState with the argument
GL_INDEX_ARRAY. If enabled, the color index array is used when
glDrawArrays, glMultiDrawArrays, glDrawElements,
glMultiDrawElements, glDrawRangeElements, or glArrayElement
is called.
typeSpecifies the data type of each color index in the array. Symbolic
constants GL_UNSIGNED_BYTE, GL_SHORT, GL_INT, GL_FLOAT,
and GL_DOUBLE are accepted. The initial value is GL_FLOAT.
strideSpecifies the byte offset between consecutive color indexes. If stride is 0, the color indexes are understood to be tightly packed in the array. The initial value is 0.
pointerSpecifies a pointer to the first index in the array. The initial value is 0.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
glIndexPointer is available only if the GL version is 1.1 or
greater.
Color indexes are not supported for interleaved vertex array formats
(see glInterleavedArrays).
The color index array is initially disabled and isn't accessed when
glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glIndexPointer is not allowed between glBegin and
the corresponding glEnd, but an error may or may not be generated.
If an error is not generated, the operation is undefined.
glIndexPointer is typically implemented on the client side.
Color index array parameters are client-side state and are therefore
not saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glColorPointer,
glDisableClientState, glDrawArrays, glDrawElements,
glDrawRangeElements, glEdgeFlagPointer, glEnableClientState,
glFogCoordPointer, glIndex, glInterleavedArrays,
glMultiDrawArrays, glMultiDrawElements, glNormalPointer,
glPopClientAttrib, glPushClientAttrib,
glSecondaryColorPointer, glTexCoordPointer,
glVertexAttribPointer, glVertexPointer
void glInitNames()
The name stack is used during selection mode to allow sets of
rendering commands to be uniquely identified. It consists of an
ordered set of unsigned integers. glInitNames causes the name stack
to be initialized to its default empty state.
The name stack is always empty while the render mode is not
GL_SELECT. Calls to glInitNames while the render mode is not
GL_SELECT are ignored.
GL_INVALID_OPERATION is generated if glInitNames is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glLoadName, glPushName, glRenderMode, glSelectBuffer
void glInterleavedArrays(int format, int stride, System.Memory pointer)
glInterleavedArrays lets you specify and enable individual color,
normal, texture and vertex arrays whose elements are part of a larger
aggregate array element. For some implementations, this is more
efficient than specifying the arrays separately.
If stride is 0, the aggregate elements are stored consecutively. Otherwise, stride bytes occur between the beginning of one aggregate array element and the beginning of the next aggregate array element.
format serves as a ``key'' describing the extraction of individual arrays from the aggregate array. If format contains a T, then texture coordinates are extracted from the interleaved array. If C is present, color values are extracted. If N is present, normal coordinates are extracted. Vertex coordinates are always extracted.
The digits 2, 3, and 4 denote how many values are extracted. F indicates that values are extracted as floating-point values. Colors may also be extracted as 4 unsigned bytes if 4UB follows the C. If a color is extracted as 4 unsigned bytes, the vertex array element which follows is located at the first possible floating-point aligned address.
formatSpecifies the type of array to enable. Symbolic constants GL_V2F,
GL_V3F, GL_C4UB_V2F, GL_C4UB_V3F, GL_C3F_V3F,
GL_N3F_V3F, GL_C4F_N3F_V3F, GL_T2F_V3F, GL_T4F_V4F,
GL_T2F_C4UB_V3F, GL_T2F_C3F_V3F, GL_T2F_N3F_V3F,
GL_T2F_C4F_N3F_V3F, and GL_T4F_C4F_N3F_V4F are accepted.
strideSpecifies the offset in bytes between each aggregate array element.
GL_INVALID_ENUM is generated if format is not an accepted
value.
GL_INVALID_VALUE is generated if stride is negative.
glInterleavedArrays is available only if the GL version is 1.1 or
greater.
If glInterleavedArrays is called while compiling a display list, it
is not compiled into the list, and it is executed immediately.
Execution of glInterleavedArrays is not allowed between the
execution of glBegin and the corresponding execution of glEnd,
but an error may or may not be generated. If no error is generated,
the operation is undefined.
glInterleavedArrays is typically implemented on the client side.
Vertex array parameters are client-side state and are therefore not
saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glInterleavedArrays
only updates the texture coordinate array for the client active
texture unit. The texture coordinate state for other client texture
units is not updated, regardless of whether the client texture unit is
enabled or not.
Secondary color values are not supported in interleaved vertex array formats.
glArrayElement, glClientActiveTexture, glColorPointer,
glDrawArrays, glDrawElements, glEdgeFlagPointer,
glEnableClientState, glGetPointerv, glIndexPointer,
glNormalPointer, glSecondaryColorPointer, glTexCoordPointer,
glVertexPointer
int glIsEnabled(int cap)
glIsEnabled returns GL_TRUE if cap is an enabled capability
and returns GL_FALSE otherwise. Initially all capabilities except
GL_DITHER are disabled; GL_DITHER is initially enabled.
The following capabilities are accepted for cap:
| Constant | See |
GL_ALPHA_TEST | glAlphaFunc |
GL_AUTO_NORMAL | glEvalCoord |
GL_BLEND | glBlendFunc, glLogicOp |
| GL_CLIP_PLANEi | glClipPlane |
GL_COLOR_ARRAY | glColorPointer |
GL_COLOR_LOGIC_OP | glLogicOp |
GL_COLOR_MATERIAL | glColorMaterial |
GL_COLOR_SUM | glSecondaryColor |
GL_COLOR_TABLE | glColorTable |
GL_CONVOLUTION_1D | glConvolutionFilter1D |
GL_CONVOLUTION_2D | glConvolutionFilter2D |
GL_CULL_FACE | glCullFace |
GL_DEPTH_TEST | glDepthFunc, glDepthRange |
GL_DITHER | glEnable |
GL_EDGE_FLAG_ARRAY | glEdgeFlagPointer |
GL_FOG | glFog |
GL_FOG_COORD_ARRAY | glFogCoordPointer |
GL_HISTOGRAM | glHistogram |
GL_INDEX_ARRAY | glIndexPointer |
GL_INDEX_LOGIC_OP | glLogicOp |
| GL_LIGHTi | glLightModel, glLight |
GL_LIGHTING | glMaterial, glLightModel, glLight |
GL_LINE_SMOOTH | glLineWidth |
GL_LINE_STIPPLE | glLineStipple |
GL_MAP1_COLOR_4 | glMap1 |
GL_MAP1_INDEX | glMap1 |
GL_MAP1_NORMAL | glMap1 |
GL_MAP1_TEXTURE_COORD_1 | glMap1 |
GL_MAP1_TEXTURE_COORD_2 | glMap1 |
GL_MAP1_TEXTURE_COORD_3 | glMap1 |
GL_MAP1_TEXTURE_COORD_4 | glMap1 |
GL_MAP2_COLOR_4 | glMap2 |
GL_MAP2_INDEX | glMap2 |
GL_MAP2_NORMAL | glMap2 |
GL_MAP2_TEXTURE_COORD_1 | glMap2 |
GL_MAP2_TEXTURE_COORD_2 | glMap2 |
GL_MAP2_TEXTURE_COORD_3 | glMap2 |
GL_MAP2_TEXTURE_COORD_4 | glMap2 |
GL_MAP2_VERTEX_3 | glMap2 |
GL_MAP2_VERTEX_4 | glMap2 |
GL_MINMAX | glMinmax |
GL_MULTISAMPLE | glSampleCoverage |
GL_NORMAL_ARRAY | glNormalPointer |
GL_NORMALIZE | glNormal |
GL_POINT_SMOOTH | glPointSize |
GL_POINT_SPRITE | glEnable |
GL_POLYGON_SMOOTH | glPolygonMode |
GL_POLYGON_OFFSET_FILL | glPolygonOffset |
GL_POLYGON_OFFSET_LINE | glPolygonOffset |
GL_POLYGON_OFFSET_POINT | glPolygonOffset |
GL_POLYGON_STIPPLE | glPolygonStipple |
GL_POST_COLOR_MATRIX_COLOR_TABLE | glColorTable |
GL_POST_CONVOLUTION_COLOR_TABLE | glColorTable |
GL_RESCALE_NORMAL | glNormal |
GL_SAMPLE_ALPHA_TO_COVERAGE | glSampleCoverage |
GL_SAMPLE_ALPHA_TO_ONE | glSampleCoverage |
GL_SAMPLE_COVERAGE | glSampleCoverage |
GL_SCISSOR_TEST | glScissor |
GL_SECONDARY_COLOR_ARRAY | glSecondaryColorPointer |
GL_SEPARABLE_2D | glSeparableFilter2D |
GL_STENCIL_TEST | glStencilFunc, glStencilOp |
GL_TEXTURE_1D | glTexImage1D |
GL_TEXTURE_2D | glTexImage2D |
GL_TEXTURE_3D | glTexImage3D |
GL_TEXTURE_COORD_ARRAY | glTexCoordPointer |
GL_TEXTURE_CUBE_MAP | glTexImage2D |
GL_TEXTURE_GEN_Q | glTexGen |
GL_TEXTURE_GEN_R | glTexGen |
GL_TEXTURE_GEN_S | glTexGen |
GL_TEXTURE_GEN_T | glTexGen |
GL_VERTEX_ARRAY | glVertexPointer |
GL_VERTEX_PROGRAM_POINT_SIZE | glEnable |
GL_VERTEX_PROGRAM_TWO_SIDE | glEnable |
capSpecifies a symbolic constant indicating a GL capability.
GL_INVALID_ENUM is generated if cap is not an accepted value.
GL_INVALID_OPERATION is generated if glIsEnabled is executed
between the execution of glBegin and the corresponding execution of
glEnd.
If an error is generated, glIsEnabled returns 0.
GL_COLOR_LOGIC_OP, GL_COLOR_ARRAY, GL_EDGE_FLAG_ARRAY,
GL_INDEX_ARRAY, GL_INDEX_LOGIC_OP, GL_NORMAL_ARRAY,
GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE,
GL_POLYGON_OFFSET_POINT, GL_TEXTURE_COORD_ARRAY, and
GL_VERTEX_ARRAY are available only if the GL version is 1.1 or
greater.
GL_RESCALE_NORMAL, and GL_TEXTURE_3D are available only if the
GL version is 1.2 or greater.
GL_MULTISAMPLE, GL_SAMPLE_ALPHA_TO_COVERAGE,
GL_SAMPLE_ALPHA_TO_ONE, GL_SAMPLE_COVERAGE,
GL_TEXTURE_CUBE_MAP are available only if the GL version is 1.3 or
greater.
GL_FOG_COORD_ARRAY and GL_SECONDARY_COLOR_ARRAY are available
only if the GL version is 1.4 or greater.
GL_POINT_SPRITE, GL_VERTEX_PROGRAM_POINT_SIZE, and
GL_VERTEX_PROGRAM_TWO_SIDE are available only if the GL version is
2.0 or greater.
GL_COLOR_TABLE, GL_CONVOLUTION_1D, GL_CONVOLUTION_2D,
GL_HISTOGRAM, GL_MINMAX, GL_POST_COLOR_MATRIX_COLOR_TABLE,
GL_POST_CONVOLUTION_COLOR_TABLE, and GL_SEPARABLE_2D are
available only if ARB_imaging is returned when glGet is
called with GL_EXTENSIONS.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, the following
parameters return the associated value for the active texture unit:
GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
GL_TEXTURE_CUBE_MAP, GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T,
GL_TEXTURE_GEN_R, GL_TEXTURE_GEN_Q, GL_TEXTURE_MATRIX, and
GL_TEXTURE_STACK_DEPTH. Likewise, the following parameters return
the associated value for the active client texture unit:
GL_TEXTURE_COORD_ARRAY, GL_TEXTURE_COORD_ARRAY_SIZE,
GL_TEXTURE_COORD_ARRAY_STRIDE, GL_TEXTURE_COORD_ARRAY_TYPE.
glEnable, glEnableClientState, glGet
int glIsList(int list)
glIsList returns GL_TRUE if list is the name of a display
list and returns GL_FALSE if it is not, or if an error occurs.
A name returned by glGenLists, but not yet associated with a
display list by calling glNewList, is not the name of a display
list.
listSpecifies a potential display list name.
GL_INVALID_OPERATION is generated if glIsList is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCallList, glCallLists, glDeleteLists, glGenLists,
glNewList
int glIsTexture(int texture)
glIsTexture returns GL_TRUE if texture is currently the
name of a texture. If texture is zero, or is a non-zero value
that is not currently the name of a texture, or if an error occurs,
glIsTexture returns GL_FALSE.
A name returned by glGenTextures, but not yet associated with a
texture by calling glBindTexture, is not the name of a texture.
textureSpecifies a value that may be the name of a texture.
GL_INVALID_OPERATION is generated if glIsTexture is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glIsTexture is available only if the GL version is 1.1 or greater.
glBindTexture, glCopyTexImage1D, glCopyTexImage2D,
glDeleteTextures, glGenTextures, glGet, glGetTexParameter,
glTexImage1D, glTexImage2D, glTexImage3D, glTexParameter
void glLight(int light, int pname, float|int|array(float|int) param)
glLight sets the values of individual light source parameters.
light names the light and is a symbolic name of the form
GL_LIGHTi, where i ranges from 0 to the value of
GL_MAX_LIGHTS - 1. pname specifies one of ten light source
parameters, again by symbolic name. params is either a single
value or an array that contains the new values.
To enable and disable lighting calculation, call glEnable and
glDisable with argument GL_LIGHTING. Lighting is initially
disabled. When it is enabled, light sources that are enabled
contribute to the lighting calculation. Light source i is enabled
and disabled using glEnable and glDisable with argument
GL_LIGHTi.
The ten light parameters are as follows:
GL_AMBIENT | params contains four integer or floating-point values that specify the ambient RGBA intensity of the light. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial ambient light intensity is (0, 0, 0, 1). |
GL_DIFFUSE | params contains four integer or floating-point values
that specify the diffuse RGBA intensity of the light. Integer values
are mapped linearly such that the most positive representable value
maps to 1.0, and the most negative representable value maps to -1.0.
Floating-point values are mapped directly. Neither integer nor
floating-point values are clamped. The initial value for |
GL_SPECULAR | params contains four integer or floating-point values
that specify the specular RGBA intensity of the light. Integer values
are mapped linearly such that the most positive representable value
maps to 1.0, and the most negative representable value maps to -1.0.
Floating-point values are mapped directly. Neither integer nor
floating-point values are clamped. The initial value for |
GL_POSITION | params contains four integer or floating-point values that specify the position of the light in homogeneous object coordinates. Both integer and floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The position is transformed by the modelview matrix when |
GL_SPOT_DIRECTION | params contains three integer or floating-point values that specify the direction of the light in homogeneous object coordinates. Both integer and floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The spot direction is transformed by the upper 3x3 of the
modelview matrix when |
GL_SPOT_EXPONENT | params is a single integer or floating-point value that specifies the intensity distribution of the light. Integer and floating-point values are mapped directly. Only values in the range [0, 128] are accepted. Effective light intensity is attenuated
by the cosine of the angle between the direction of the light and the
direction from the light to the vertex being lighted, raised to the
power of the spot exponent. Thus, higher spot exponents result in a
more focused light source, regardless of the spot cutoff angle (see
|
GL_SPOT_CUTOFF | params is a single integer or floating-point value that specifies the maximum spread angle of a light source. Integer and floating-point values are mapped directly. Only values in the range [0, 90] and the special value 180 are accepted. If the angle between the direction of the light and the direction from the light to the vertex being lighted is greater than the spot cutoff angle, the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors. The initial spot cutoff is 180, resulting in uniform light distribution. |
GL_CONSTANT_ATTENUATION | |
GL_LINEAR_ATTENUATION | |
GL_QUADRATIC_ATTENUATION | params is a single integer or floating-point value that specifies one of the three light attenuation factors. Integer and floating-point values are mapped directly. Only nonnegative values are accepted. If the light is positional, rather than directional, its intensity is attenuated by the reciprocal of the sum of the constant factor, the linear factor times the distance between the light and the vertex being lighted, and the quadratic factor times the square of the same distance. The initial attenuation factors are (1, 0, 0), resulting in no attenuation. |
lightSpecifies a light. The number of lights depends on the implementation,
but at least eight lights are supported. They are identified by
symbolic names of the form GL_LIGHTi, where i ranges from 0
to the value of GL_MAX_LIGHTS - 1.
pnameSpecifies a single-valued light source parameter for light.
GL_SPOT_EXPONENT, GL_SPOT_CUTOFF, GL_CONSTANT_ATTENUATION,
GL_LINEAR_ATTENUATION, and GL_QUADRATIC_ATTENUATION are
accepted.
paramSpecifies the value that parameter pname of light source light will be set to.
lightSpecifies a light. The number of lights depends on the implementation,
but at least eight lights are supported. They are identified by
symbolic names of the form GL_LIGHTi, where i ranges from 0
to the value of GL_MAX_LIGHTS - 1.
pnameSpecifies a light source parameter for light. GL_AMBIENT,
GL_DIFFUSE, GL_SPECULAR, GL_POSITION, GL_SPOT_CUTOFF,
GL_SPOT_DIRECTION, GL_SPOT_EXPONENT, GL_CONSTANT_ATTENUATION,
GL_LINEAR_ATTENUATION, and GL_QUADRATIC_ATTENUATION are
accepted.
paramsSpecifies a pointer to the value or values that parameter pname of light source light will be set to.
GL_INVALID_ENUM is generated if either light or pname is
not an accepted value.
GL_INVALID_VALUE is generated if a spot exponent value is specified
outside the range [0, 128], or if spot cutoff is specified outside the
range [0, 90] (except for the special value 180), or if a negative
attenuation factor is specified.
GL_INVALID_OPERATION is generated if glLight is executed between
the execution of glBegin and the corresponding execution of
glEnd.
It is always the case that GL_LIGHTi = GL_LIGHT0 +
i.
glColorMaterial, glLightModel, glMaterial
void glLightModel(int pname, float|int|array(float|int) param)
glLightModel sets the lighting model parameter. pname names a
parameter and params gives the new value. There are three
lighting model parameters:
GL_LIGHT_MODEL_AMBIENT | params contains four integer or floating-point values that specify the ambient RGBA intensity of the entire scene. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial ambient scene intensity is (0.2, 0.2, 0.2, 1.0). |
GL_LIGHT_MODEL_COLOR_CONTROL | params must be either |
GL_LIGHT_MODEL_LOCAL_VIEWER | params is a single integer or floating-point value that specifies how specular reflection angles are computed. If params is 0 (or 0.0), 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. The initial value is 0. |
GL_LIGHT_MODEL_TWO_SIDE | params is a single integer or floating-point value that specifies whether one- or two-sided lighting calculations are done for polygons. It has no effect on the lighting calculations for points, lines, or bitmaps. If params is 0 (or 0.0), one-sided lighting is specified, and only the front material parameters are used in the lighting equation. Otherwise, two-sided lighting is specified. In this case, vertices of back-facing polygons are lighted using the back material parameters and have their normals reversed before the lighting equation is evaluated. Vertices of front-facing polygons are always lighted using the front material parameters, with no change to their normals. The initial value is 0. |
The alpha component of the resulting lighted color is set to the alpha value of the material diffuse reflectance.
In color index mode, the value of the lighted index of a vertex ranges
from the ambient to the specular values passed to glMaterial using
GL_COLOR_INDEXES. Diffuse and specular coefficients, computed with
a (.30, .59, .11) weighting of the lights' colors, the shininess of
the material, and the same reflection and attenuation equations as in
the RGBA case, determine how much above ambient the resulting index
is.
pnameSpecifies a single-valued lighting model parameter.
GL_LIGHT_MODEL_LOCAL_VIEWER, GL_LIGHT_MODEL_COLOR_CONTROL, and
GL_LIGHT_MODEL_TWO_SIDE are accepted.
paramSpecifies the value that param will be set to.
pnameSpecifies a lighting model parameter. GL_LIGHT_MODEL_AMBIENT,
GL_LIGHT_MODEL_COLOR_CONTROL, GL_LIGHT_MODEL_LOCAL_VIEWER, and
GL_LIGHT_MODEL_TWO_SIDE are accepted.
paramsSpecifies a pointer to the value or values that params will be set to.
GL_INVALID_ENUM is generated if pname is not an accepted
value.
GL_INVALID_ENUM is generated if pname is
GL_LIGHT_MODEL_COLOR_CONTROL and params is not one of
GL_SINGLE_COLOR or GL_SEPARATE_SPECULAR_COLOR.
GL_INVALID_OPERATION is generated if glLightModel is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GL_LIGHT_MODEL_COLOR_CONTROL is available only if the GL version is
1.2 or greater.
glLight, glMaterial
void glLineStipple(int factor, int pattern)
Line stippling masks out certain fragments produced by rasterization; those fragments will not be drawn. The masking is achieved by using three parameters: the 16-bit line stipple pattern pattern, the repeat count factor, and an integer stipple counter s.
Counter s is reset to 0 whenever glBegin is called and before
each line segment of a glBegin(GL_LINES)/glEnd sequence is
generated. It is incremented after each fragment of a unit width
aliased line segment is generated or after each i fragments of an
i width line segment are generated. The i fragments
associated with count s are masked out if
pattern bit (s/factor)%16
is 0, otherwise these fragments are sent to the frame buffer. Bit zero of pattern is the least significant bit.
Antialiased lines are treated as a sequence of 1×width rectangles for purposes of stippling. Whether rectangle s is rasterized or not depends on the fragment rule described for aliased lines, counting rectangles rather than groups of fragments.
To enable and disable line stippling, call glEnable and
glDisable with argument GL_LINE_STIPPLE. When enabled, the line
stipple pattern is applied as described above. When disabled, it is as
if the pattern were all 1's. Initially, line stippling is disabled.
factorSpecifies a multiplier for each bit in the line stipple pattern. If factor is 3, for example, each bit in the pattern is used three times before the next bit in the pattern is used. factor is clamped to the range [1, 256] and defaults to 1.
patternSpecifies a 16-bit integer whose bit pattern determines which fragments of a line will be drawn when the line is rasterized. Bit zero is used first; the default pattern is all 1's.
GL_INVALID_OPERATION is generated if glLineStipple is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glLineWidth, glPolygonStipple
void glLineWidth(float width)
glLineWidth specifies the rasterized width of both aliased and
antialiased lines. Using a line width other than 1 has different
effects, depending on whether line antialiasing is enabled. To enable
and disable line antialiasing, call glEnable and glDisable with
argument GL_LINE_SMOOTH. Line antialiasing is initially disabled.
If line antialiasing is disabled, the actual width is determined by rounding the supplied width to the nearest integer. (If the rounding results in the value 0, it is as if the line width were 1.) If ∣Δx∣>=∣Δy∣ , i pixels are filled in each column that is rasterized, where i is the rounded value of width. Otherwise, i pixels are filled in each row that is rasterized.
If antialiasing is enabled, line rasterization produces a fragment for each pixel square that intersects the region lying within the rectangle having width equal to the current line width, length equal to the actual length of the line, and centered on the mathematical line segment. The coverage value for each fragment is the window coordinate area of the intersection of the rectangular region with the corresponding pixel square. This value is saved and used in the final rasterization step.
Not all widths can be supported when line antialiasing is enabled. If
an unsupported width is requested, the nearest supported width is
used. Only width 1 is guaranteed to be supported; others depend on the
implementation. Likewise, there is a range for aliased line widths as
well. To query the range of supported widths and the size difference
between supported widths within the range, call glGet with
arguments GL_ALIASED_LINE_WIDTH_RANGE,
GL_SMOOTH_LINE_WIDTH_RANGE, and
GL_SMOOTH_LINE_WIDTH_GRANULARITY.
widthSpecifies the width of rasterized lines. The initial value is 1.
GL_INVALID_VALUE is generated if width is less than or equal
to 0.
GL_INVALID_OPERATION is generated if glLineWidth is executed
between the execution of glBegin and the corresponding execution of
glEnd.
The line width specified by glLineWidth is always returned when
GL_LINE_WIDTH is queried. Clamping and rounding for aliased and
antialiased lines have no effect on the specified value.
Nonantialiased line width may be clamped to an
implementation-dependent maximum. Call glGet with
GL_ALIASED_LINE_WIDTH_RANGE to determine the maximum width.
In OpenGL 1.2, the tokens GL_LINE_WIDTH_RANGE and
GL_LINE_WIDTH_GRANULARITY were replaced by
GL_ALIASED_LINE_WIDTH_RANGE, GL_SMOOTH_LINE_WIDTH_RANGE, and
GL_SMOOTH_LINE_WIDTH_GRANULARITY. The old names are retained for
backward compatibility, but should not be used in new code.
glEnable
void glListBase(int base)
glCallLists specifies an array of offsets. Display-list names are
generated by adding base to each offset. Names that reference
valid display lists are executed; the others are ignored.
baseSpecifies an integer offset that will be added to glCallLists
offsets to generate display-list names. The initial value is 0.
GL_INVALID_OPERATION is generated if glListBase is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCallLists
void glLoadIdentity()
glLoadIdentity replaces the current matrix with the identity
matrix. It is semantically equivalent to calling glLoadMatrix with
the identity matrix
(
| 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 |
but in some cases it is more efficient.
GL_INVALID_OPERATION is generated if glLoadIdentity is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glLoadMatrix, glLoadTransposeMatrix, glMatrixMode,
glMultMatrix, glMultTransposeMatrix, glPushMatrix
void glLoadMatrix(array(float|int) m)
glLoadMatrix replaces the current matrix with the one whose
elements are specified by m. The current matrix is the projection
matrix, modelview matrix, or texture matrix, depending on the current
matrix mode (see glMatrixMode).
The current matrix, M, defines a transformation of coordinates. For instance, assume M refers to the modelview matrix. If v=(v[0], v[1], v[2], v[3]) is the set of object coordinates of a vertex, and m points to an array of 16 single- or double-precision floating-point values m={m[0], m[1], ..., m[15]} , then the modelview transformation M(v) does the following:
M(v)=(
| m[0] | m[4] | m[8] | m[12] |
| m[1] | m[5] | m[9] | m[13] |
| m[2] | m[6] | m[10] | m[14] |
| m[3] | m[7] | m[11] | m[15] |
| v[0] |
| v[1] |
| v[2] |
| v[3] |
Projection and texture transformations are similarly defined.
mSpecifies a pointer to 16 consecutive values, which are used as the elements of a 4×4 column-major matrix.
GL_INVALID_OPERATION is generated if glLoadMatrix is executed
between the execution of glBegin and the corresponding execution of
glEnd.
While the elements of the matrix may be specified with single or double precision, the GL implementation may store or operate on these values in less than single precision.
glLoadIdentity, glMatrixMode, glMultMatrix,
glMultTransposeMatrix, glPushMatrix
void glLoadName(int name)
The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers and is initially empty.
glLoadName causes name to replace the value on the top of the
name stack.
The name stack is always empty while the render mode is not
GL_SELECT. Calls to glLoadName while the render mode is not
GL_SELECT are ignored.
nameSpecifies a name that will replace the top value on the name stack.
GL_INVALID_OPERATION is generated if glLoadName is called while
the name stack is empty.
GL_INVALID_OPERATION is generated if glLoadName is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glInitNames, glPushName, glRenderMode, glSelectBuffer
void glLogicOp(int opcode)
glLogicOp specifies a logical operation that, when enabled, is
applied between the incoming color index or RGBA color and the color
index or RGBA color at the corresponding location in the frame buffer.
To enable or disable the logical operation, call glEnable and
glDisable using the symbolic constant GL_COLOR_LOGIC_OP for RGBA
mode or GL_INDEX_LOGIC_OP for color index mode. The initial value
is disabled for both operations.
| Opcode | Resulting Operation |
GL_CLEAR | 0 |
GL_SET | 1 |
GL_COPY | s |
GL_COPY_INVERTED | ~s |
GL_NOOP | d |
GL_INVERT | ~d |
GL_AND | s & d |
GL_NAND | ~(s & d) |
GL_OR | s | d |
GL_NOR | ~(s | d) |
GL_XOR | s ^ d |
GL_EQUIV | ~(s ^ d) |
GL_AND_REVERSE | s & ~d |
GL_AND_INVERTED | ~s & d |
GL_OR_REVERSE | s | ~d |
GL_OR_INVERTED | ~s | d |
opcodeSpecifies a symbolic constant that selects a logical operation. The
following symbols are accepted: GL_CLEAR, GL_SET, GL_COPY,
GL_COPY_INVERTED, GL_NOOP, GL_INVERT, GL_AND, GL_NAND,
GL_OR, GL_NOR, GL_XOR, GL_EQUIV, GL_AND_REVERSE,
GL_AND_INVERTED, GL_OR_REVERSE, and GL_OR_INVERTED. The
initial value is GL_COPY.
GL_INVALID_ENUM is generated if opcode is not an accepted
value.
GL_INVALID_OPERATION is generated if glLogicOp is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Color index logical operations are always supported. RGBA logical operations are supported only if the GL version is 1.1 or greater.
When more than one RGBA color or index buffer is enabled for drawing,
logical operations are performed separately for each enabled buffer,
using for the destination value the contents of that buffer (see
glDrawBuffer).
glAlphaFunc, glBlendFunc, glDrawBuffer, glEnable,
glStencilOp
void glMapGrid(int un, float u1, float u2)
void glMapGrid(int un, float u1, float u2, int vn, float v1, float v2)
glMapGrid and glEvalMesh1 and glEvalMesh2 are used together
to efficiently generate and evaluate a series of evenly-spaced map
domain values. glEvalMesh1 and glEvalMesh2 steps through the
integer domain of a one- or two-dimensional grid, whose range is the
domain of the evaluation maps specified by glMap1 and glMap2.
glMapGrid specifies the linear grid mappings between the i (or
i and j) integer grid coordinates, to the u (or u
and v) floating-point evaluation map coordinates. See glMap1
and glMap2 for details of how u and v coordinates are
evaluated.
glMapGrid with three arguments specifies a single linear mapping
such that integer grid coordinate 0 maps exactly to u1, and
integer grid coordinate un maps exactly to u2. All other
integer grid coordinates i are mapped so that
u=i(u2-u1)/un+u1
glMapGrid with six arguments specifies two such linear mappings.
One maps integer grid coordinate
i=0
exactly to u1, and integer grid coordinate
i=un
exactly to u2. The other maps integer grid coordinate
j=0
exactly to v1, and integer grid coordinate
j=vn
exactly to v2. Other integer grid coordinates i and j
are mapped such that
u=i(u2-u1)/un+u1
v=j(v2-v1)/vn+v1
The mappings specified by glMapGrid are used identically by
glEvalMesh1 and glEvalMesh2 and glEvalPoint.
unSpecifies the number of partitions in the grid range interval [u1, u2]. Must be positive.
u1u2Specify the mappings for integer grid domain values i=0 and i=un .
vnSpecifies the number of partitions in the grid range interval [v1, v2] (With six arguments only).
v1v2Specify the mappings for integer grid domain values j=0 and j=vn (With six arguments only).
GL_INVALID_VALUE is generated if either un or vn is not
positive.
GL_INVALID_OPERATION is generated if glMapGrid is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glEvalCoord, glEvalMesh1 and glEvalMesh2, glEvalPoint,
glMap1, glMap2
void glMaterial(int face, int pname, float|int|array(float|int) param)
glMaterial assigns values to material parameters. There are two
matched sets of material parameters. One, the front-facing set,
is used to shade points, lines, bitmaps, and all polygons (when
two-sided lighting is disabled), or just front-facing polygons (when
two-sided lighting is enabled). The other set, back-facing, is
used to shade back-facing polygons only when two-sided lighting is
enabled. Refer to the glLightModel reference page for details
concerning one- and two-sided lighting calculations.
glMaterial takes three arguments. The first, face, specifies
whether the GL_FRONT materials, the GL_BACK materials, or both
GL_FRONT_AND_BACK materials will be modified. The second,
pname, specifies which of several parameters in one or both sets
will be modified. The third, params, specifies what value or
values will be assigned to the specified parameter.
Material parameters are used in the lighting equation that is
optionally applied to each vertex. The equation is discussed in the
glLightModel reference page. The parameters that can be specified
using glMaterial, and their interpretations by the lighting
equation, are as follows:
GL_AMBIENT | params contains four integer or floating-point values that specify the ambient RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial ambient reflectance for both front- and back-facing materials is (0.2, 0.2, 0.2, 1.0). |
GL_DIFFUSE | params contains four integer or floating-point values that specify the diffuse RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial diffuse reflectance for both front- and back-facing materials is (0.8, 0.8, 0.8, 1.0). |
GL_SPECULAR | params contains four integer or floating-point values that specify the specular RGBA reflectance of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial specular reflectance for both front- and back-facing materials is (0, 0, 0, 1). |
GL_EMISSION | params contains four integer or floating-point values that specify the RGBA emitted light intensity of the material. Integer values are mapped linearly such that the most positive representable value maps to 1.0, and the most negative representable value maps to -1.0. Floating-point values are mapped directly. Neither integer nor floating-point values are clamped. The initial emission intensity for both front- and back-facing materials is (0, 0, 0, 1). |
GL_SHININESS | params is a single integer or floating-point value that specifies the RGBA specular exponent of the material. Integer and floating-point values are mapped directly. Only values in the range [0, 128] are accepted. The initial specular exponent for both front- and back-facing materials is 0. |
GL_AMBIENT_AND_DIFFUSE | Equivalent to calling |
GL_COLOR_INDEXES | params contains three integer or floating-point values
specifying the color indices for ambient, diffuse, and specular
lighting. These three values, and |
faceSpecifies which face or faces are being updated. Must be one of
GL_FRONT, GL_BACK, or GL_FRONT_AND_BACK.
pnameSpecifies the single-valued material parameter of the face or faces
that is being updated. Must be GL_SHININESS.
paramSpecifies the value that parameter GL_SHININESS will be set to.
faceSpecifies which face or faces are being updated. Must be one of
GL_FRONT, GL_BACK, or GL_FRONT_AND_BACK.
pnameSpecifies the material parameter of the face or faces that is being
updated. Must be one of GL_AMBIENT, GL_DIFFUSE, GL_SPECULAR,
GL_EMISSION, GL_SHININESS, GL_AMBIENT_AND_DIFFUSE, or
GL_COLOR_INDEXES.
paramsSpecifies a pointer to the value or values that pname will be set to.
GL_INVALID_ENUM is generated if either face or pname is
not an accepted value.
GL_INVALID_VALUE is generated if a specular exponent outside the
range [0, 128] is specified.
The material parameters can be updated at any time. In particular,
glMaterial can be called between a call to glBegin and the
corresponding call to glEnd. If only a single material parameter is
to be changed per vertex, however, glColorMaterial is preferred
over glMaterial (see glColorMaterial).
While the ambient, diffuse, specular and emission material parameters all have alpha components, only the diffuse alpha component is used in the lighting computation.
glColorMaterial, glLight, glLightModel
void glMatrixMode(int mode)
glMatrixMode sets the current matrix mode. mode can assume one
of four values:
GL_MODELVIEW | Applies subsequent matrix operations to the modelview matrix stack. |
GL_PROJECTION | Applies subsequent matrix operations to the projection matrix stack. |
GL_TEXTURE | Applies subsequent matrix operations to the texture matrix stack. |
GL_COLOR | Applies subsequent matrix operations to the color matrix stack. |
glGet with argument GL_MATRIX_MODE.
The initial value is GL_MODELVIEW.
modeSpecifies which matrix stack is the target for subsequent matrix
operations. Three values are accepted: GL_MODELVIEW,
GL_PROJECTION, and GL_TEXTURE. The initial value is
GL_MODELVIEW. Additionally, if the ARB_imaging extension is
supported, GL_COLOR is also accepted.
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glMatrixMode is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glLoadMatrix, glLoadTransposeMatrix, glMultMatrix,
glMultTransposeMatrix, glPopMatrix, glPushMatrix
void glMultMatrix(array(float|int) m)
glMultMatrix multiplies the current matrix with the one specified
using m, and replaces the current matrix with the product.
The current matrix is determined by the current matrix mode (see
glMatrixMode). It is either the projection matrix, modelview
matrix, or the texture matrix.
mPoints to 16 consecutive values that are used as the elements of a 4×4 column-major matrix.
If the current matrix is C and the coordinates to be transformed are v=(v[0], v[1], v[2], v[3]) , then the current transformation is C×v , or
(
| c[0] | c[4] | c[8] | c[12] |
| c[1] | c[5] | c[9] | c[13] |
| c[2] | c[6] | c[10] | c[14] |
| c[3] | c[7] | c[11] | c[15] |
| v[0] |
| v[1] |
| v[2] |
| v[3] |
Calling glMultMatrix with an argument of
m={m[0], m[1], ..., m[15]}
replaces the current transformation with
(C×M)×v
, or
(
| c[0] | c[4] | c[8] | c[12] |
| c[1] | c[5] | c[9] | c[13] |
| c[2] | c[6] | c[10] | c[14] |
| c[3] | c[7] | c[11] | c[15] |
| m[0] | m[4] | m[8] | m[12] |
| m[1] | m[5] | m[9] | m[13] |
| m[2] | m[6] | m[10] | m[14] |
| m[3] | m[7] | m[11] | m[15] |
| v[0] |
| v[1] |
| v[2] |
| v[3] |
Where v is represented as a 4×1 matrix.
GL_INVALID_OPERATION is generated if glMultMatrix is executed
between the execution of glBegin and the corresponding execution of
glEnd.
While the elements of the matrix may be specified with single or double precision, the GL may store or operate on these values in less-than-single precision.
In many computer languages,
4×4
arrays are represented in row-major order. The transformations just
described represent these matrices in column-major order. The order of
the multiplication is important. For example, if the current
transformation is a rotation, and glMultMatrix is called with a
translation matrix, the translation is done directly on the
coordinates to be transformed, while the rotation is done on the
results of that translation.
glLoadIdentity, glLoadMatrix, glLoadTransposeMatrix,
glMatrixMode, glMultTransposeMatrix, glPushMatrix
void glNormal(float|int nx, float|int ny, float|int nz)
void glNormal(array(float|int) v)
The current normal is set to the given coordinates whenever
glNormal is issued. Byte, short, or integer arguments are converted
to floating-point format with a linear mapping that maps the most
positive representable integer value to 1.0 and the most negative
representable integer value to -1.0.
Normals specified with glNormal need not have unit length. If
GL_NORMALIZE is enabled, then normals of any length specified with
glNormal are normalized after transformation. If
GL_RESCALE_NORMAL is enabled, normals are scaled by a scaling
factor derived from the modelview matrix. GL_RESCALE_NORMAL
requires that the originally specified normals were of unit length,
and that the modelview matrix contain only uniform scales for proper
results. To enable and disable normalization, call glEnable and
glDisable with either GL_NORMALIZE or GL_RESCALE_NORMAL.
Normalization is initially disabled.
nxnynzSpecify the x, y, and z coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1).
vSpecifies an array of three elements: the x, y, and z coordinates of the new current normal.
The current normal can be updated at any time. In particular,
glNormal can be called between a call to glBegin and the
corresponding call to glEnd.
glBegin, glColor, glIndex, glMultiTexCoord,
glNormalPointer, glTexCoord, glVertex
void glNormalPointer(int type, int stride, System.Memory pointer)
glNormalPointer specifies the location and data format of an array
of normals to use when rendering. type specifies the data type of
each normal coordinate, and stride specifies the byte stride from
one normal to the next, allowing vertices and attributes to be packed
into a single array or stored in separate arrays. (Single-array
storage may be more efficient on some implementations; see
glInterleavedArrays.)
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while a normal array is specified,
pointer is treated as a byte offset into the buffer object's data
store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
saved as normal vertex array client-side state
(GL_NORMAL_ARRAY_BUFFER_BINDING).
When a normal array is specified, type, stride, and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the normal array, call glEnableClientState
and glDisableClientState with the argument GL_NORMAL_ARRAY. If
enabled, the normal array is used when glDrawArrays,
glMultiDrawArrays, glDrawElements, glMultiDrawElements,
glDrawRangeElements, or glArrayElement is called.
typeSpecifies the data type of each coordinate in the array. Symbolic
constants GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and
GL_DOUBLE are accepted. The initial value is GL_FLOAT.
strideSpecifies the byte offset between consecutive normals. If stride is 0, the normals are understood to be tightly packed in the array. The initial value is 0.
pointerSpecifies a pointer to the first coordinate of the first normal in the array. The initial value is 0.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
glNormalPointer is available only if the GL version is 1.1 or
greater.
The normal array is initially disabled and isn't accessed when
glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glNormalPointer is not allowed between glBegin and
the corresponding glEnd, but an error may or may not be generated.
If an error is not generated, the operation is undefined.
glNormalPointer is typically implemented on the client side.
Normal array parameters are client-side state and are therefore not
saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glColorPointer,
glDisableClientState, glDrawArrays, glDrawElements,
glDrawRangeElements, glEdgeFlagPointer, glEnableClientState,
glFogCoordPointer, glIndexPointer, glInterleavedArrays,
glMultiDrawArrays, glMultiDrawElements, glNormal,
glPopClientAttrib, glPushClientAttrib,
glSecondaryColorPointer, glTexCoordPointer,
glVertexAttribPointer, glVertexPointer
void glOrtho(float left, float right, float bottom, float top, float nearVal, float farVal)
glOrtho describes a transformation that produces a parallel
projection. The current matrix (see glMatrixMode) is multiplied by
this matrix and the result replaces the current matrix, as if
glMultMatrix were called with the following matrix as its argument:
(
| 2/right-left | 0 | 0 | tx |
| 0 | 2/top-bottom | 0 | ty |
| 0 | 0 | -2/farVal-nearVal | tz |
| 0 | 0 | 0 | 1 |
where tx=-right+left/right-left ty=-top+bottom/top-bottom tz=-farVal+nearVal/farVal-nearVal
Typically, the matrix mode is GL_PROJECTION, and
(left, bottom, -nearVal)
and
(right, top, -nearVal)
specify the points on the near clipping plane that are mapped to the
lower left and upper right corners of the window, respectively,
assuming that the eye is located at (0, 0, 0).
-farVal
specifies the location of the far clipping plane. Both nearVal
and farVal can be either positive or negative.
Use glPushMatrix and glPopMatrix to save and restore the current
matrix stack.
leftrightSpecify the coordinates for the left and right vertical clipping planes.
bottomtopSpecify the coordinates for the bottom and top horizontal clipping planes.
nearValfarValSpecify the distances to the nearer and farther depth clipping planes. These values are negative if the plane is to be behind the viewer.
GL_INVALID_VALUE is generated if left = right, or
bottom = top, or near = far.
GL_INVALID_OPERATION is generated if glOrtho is executed between
the execution of glBegin and the corresponding execution of
glEnd.
glFrustum, glMatrixMode, glMultMatrix, glPushMatrix,
glViewport
void glPassThrough(float token)
Feedback is a GL render mode. The mode is selected by calling
glRenderMode with GL_FEEDBACK. When the GL is in feedback mode,
no pixels are produced by rasterization. Instead, information about
primitives that would have been rasterized is fed back to the
application using the GL. See the glFeedbackBuffer reference page
for a description of the feedback buffer and the values in it.
glPassThrough inserts a user-defined marker in the feedback buffer
when it is executed in feedback mode. token is returned as if it
were a primitive; it is indicated with its own unique identifying
value: GL_PASS_THROUGH_TOKEN. The order of glPassThrough
commands with respect to the specification of graphics primitives is
maintained.
tokenSpecifies a marker value to be placed in the feedback buffer following
a GL_PASS_THROUGH_TOKEN.
GL_INVALID_OPERATION is generated if glPassThrough is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glPassThrough is ignored if the GL is not in feedback mode.
glFeedbackBuffer, glRenderMode
void glPixelZoom(float xfactor, float yfactor)
glPixelZoom specifies values for the x and y zoom
factors. During the execution of glDrawPixels or glCopyPixels,
if (xr, yr) is the current raster position, and a given element is in
the mth row and nth column of the pixel rectangle, then
pixels whose centers are in the rectangle with corners at
( xr+n·xfactor , yr+m·yfactor )
( xr+(n+1)·xfactor , yr+(m+1)·yfactor )
are candidates for replacement. Any pixel whose center lies on the bottom or left edge of this rectangular region is also modified.
Pixel zoom factors are not limited to positive values. Negative zoom factors reflect the resulting image about the current raster position.
xfactoryfactorSpecify the x and y zoom factors for pixel write operations.
GL_INVALID_OPERATION is generated if glPixelZoom is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCopyPixels, glDrawPixels
void glPointSize(float size)
glPointSize specifies the rasterized diameter of both aliased and
antialiased points. Using a point size other than 1 has different
effects, depending on whether point antialiasing is enabled. To enable
and disable point antialiasing, call glEnable and glDisable with
argument GL_POINT_SMOOTH. Point antialiasing is initially disabled.
The specified point size is multiplied with a distance attenuation factor and clamped to the specified point size range, and further clamped to the implementation-dependent point size range to produce the derived point size using
pointSize=clamp(size×√(1/a+b×d+c×d2))
where d is the eye-coordinate distance from the eye to the
vertex, and a, b, and c are the distance attenuation
coefficients (see glPointParameter).
If multisampling is disabled, the computed point size is used as the point's width.
If multisampling is enabled, the point may be faded by modifying the
point alpha value (see glSampleCoverage) instead of allowing the
point width to go below a given threshold (see glPointParameter).
In this case, the width is further modified in the following manner:
pointWidth={
| pointSize |
| threshold |
| pointSize>=threshold |
| otherwise |
The point alpha value is modified by computing:
pointAlpha={
| 1 |
| (pointSize/threshold)2 |
| pointSize>=threshold |
| otherwise |
If point antialiasing is disabled, the actual size is determined by rounding the supplied size to the nearest integer. (If the rounding results in the value 0, it is as if the point size were 1.) If the rounded size is odd, then the center point (x, y) of the pixel fragment that represents the point is computed as
(⌊xw⌋+.5, ⌊yw⌋+.5)
where w subscripts indicate window coordinates. All pixels that lie within the square grid of the rounded size centered at (x, y) make up the fragment. If the size is even, the center point is
(⌊xw+.5⌋, ⌊yw+.5⌋)
and the rasterized fragment's centers are the half-integer window coordinates within the square of the rounded size centered at (x, y). All pixel fragments produced in rasterizing a nonantialiased point are assigned the same associated data, that of the vertex corresponding to the point.
If antialiasing is enabled, then point rasterization produces a fragment for each pixel square that intersects the region lying within the circle having diameter equal to the current point size and centered at the point's (xw, yw). The coverage value for each fragment is the window coordinate area of the intersection of the circular region with the corresponding pixel square. This value is saved and used in the final rasterization step. The data associated with each fragment is the data associated with the point being rasterized.
Not all sizes are supported when point antialiasing is enabled. If an
unsupported size is requested, the nearest supported size is used.
Only size 1 is guaranteed to be supported; others depend on the
implementation. To query the range of supported sizes and the size
difference between supported sizes within the range, call glGet
with arguments GL_SMOOTH_POINT_SIZE_RANGE and
GL_SMOOTH_POINT_SIZE_GRANULARITY. For aliased points, query the
supported ranges and granularity with glGet with arguments
GL_ALIASED_POINT_SIZE_RANGE.
sizeSpecifies the diameter of rasterized points. The initial value is 1.
GL_INVALID_VALUE is generated if size is less than or equal to
0.
GL_INVALID_OPERATION is generated if glPointSize is executed
between the execution of glBegin and the corresponding execution of
glEnd.
The point size specified by glPointSize is always returned when
GL_POINT_SIZE is queried. Clamping and rounding for aliased and
antialiased points have no effect on the specified value.
A non-antialiased point size may be clamped to an implementation-dependent maximum. Although this maximum cannot be queried, it must be no less than the maximum value for antialiased points, rounded to the nearest integer value.
GL_POINT_SIZE_RANGE and GL_POINT_SIZE_GRANULARITY are deprecated
in GL versions 1.2 and greater. Their functionality has been replaced
by GL_SMOOTH_POINT_SIZE_RANGE and
GL_SMOOTH_POINT_SIZE_GRANULARITY.
glEnable, glPointParameter
void glPolygonMode(int face, int mode)
glPolygonMode controls the interpretation of polygons for
rasterization. face describes which polygons mode applies
to: front-facing polygons (GL_FRONT), back-facing polygons
(GL_BACK), or both (GL_FRONT_AND_BACK). The polygon mode affects
only the final rasterization of polygons. In particular, a polygon's
vertices are lit and the polygon is clipped and possibly culled before
these modes are applied.
Three modes are defined and can be specified in mode:
GL_POINT | Polygon vertices that are marked as the start of a boundary edge
are drawn as points. Point attributes such as |
GL_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 |
GL_FILL | The interior of the polygon is filled. Polygon attributes such
as |
faceSpecifies the polygons that mode applies to. Must be GL_FRONT
for front-facing polygons, GL_BACK for back-facing polygons, or
GL_FRONT_AND_BACK for front- and back-facing polygons.
modeSpecifies how polygons will be rasterized. Accepted values are
GL_POINT, GL_LINE, and GL_FILL. The initial value is
GL_FILL for both front- and back-facing polygons.
To draw a surface with filled back-facing polygons and outlined front-facing polygons, call
glPolygonMode(GL_FRONT, GL_LINE);
GL_INVALID_ENUM is generated if either face or mode is
not an accepted value.
GL_INVALID_OPERATION is generated if glPolygonMode is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Vertices are marked as boundary or nonboundary with an edge flag. Edge
flags are generated internally by the GL when it decomposes polygons;
they can be set explicitly using glEdgeFlag.
glBegin, glEdgeFlag, glLineStipple, glLineWidth,
glPointSize, glPolygonStipple
void glPolygonOffset(float factor, float units)
When GL_POLYGON_OFFSET_FILL, GL_POLYGON_OFFSET_LINE, or
GL_POLYGON_OFFSET_POINT is enabled, each fragment's depth
value will be offset after it is interpolated from the depth
values of the appropriate vertices. The value of the offset is
factor×DZ+r×units
, where DZ is a measurement of the change in depth relative to the
screen area of the polygon, and r is the smallest value that is
guaranteed to produce a resolvable offset for a given implementation.
The offset is added before the depth test is performed and before the
value is written into the depth buffer.
glPolygonOffset is useful for rendering hidden-line images, for
applying decals to surfaces, and for rendering solids with highlighted
edges.
factorSpecifies a scale factor that is used to create a variable depth offset for each polygon. The initial value is 0.
unitsIs multiplied by an implementation-specific value to create a constant depth offset. The initial value is 0.
GL_INVALID_OPERATION is generated if glPolygonOffset is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glPolygonOffset is available only if the GL version is 1.1 or
greater.
glPolygonOffset has no effect on depth coordinates placed in the
feedback buffer.
glPolygonOffset has no effect on selection.
glDepthFunc, glEnable, glGet, glIsEnabled
void glPushAttrib(int mask)
void glPopAttrib()
glPushAttrib takes one argument, a mask that indicates which groups
of state variables to save on the attribute stack. Symbolic constants
are used to set bits in the mask. mask is typically constructed
by specifying the bitwise-or of several of these constants together.
The special mask GL_ALL_ATTRIB_BITS can be used to save all
stackable states.
The symbolic mask constants and their associated GL state are as follows (the second column lists which attributes are saved):
GL_ACCUM_BUFFER_BIT | Accumulation buffer clear value |
GL_COLOR_BUFFER_BIT | GL_ALPHA_TEST enable bit |
| Alpha test function and reference value | |
GL_BLEND
enable bit | |
| Blending source and destination functions | |
| Constant blend color | |
| Blending equation | |
GL_DITHER enable
bit | |
GL_DRAW_BUFFER setting | |
GL_COLOR_LOGIC_OP enable bit | |
GL_INDEX_LOGIC_OP enable bit | |
| Logic op function | |
| Color mode and index mode clear values | |
| Color mode and index mode writemasks | |
GL_CURRENT_BIT | Current RGBA color |
| Current color index | |
| Current normal vector | |
| Current texture coordinates | |
| Current raster position | |
GL_CURRENT_RASTER_POSITION_VALID flag | |
| RGBA color associated with current raster position | |
| Color index associated with current raster position | |
| Texture coordinates associated with current raster position | |
GL_EDGE_FLAG flag | |
GL_DEPTH_BUFFER_BIT | GL_DEPTH_TEST enable bit
|
| Depth buffer test function | |
| Depth buffer clear value | |
GL_DEPTH_WRITEMASK enable bit | |
GL_ENABLE_BIT | GL_ALPHA_TEST flag |
GL_AUTO_NORMAL flag | |
GL_BLEND flag | |
| Enable bits for the user-definable clipping planes | |
GL_COLOR_MATERIAL | |
GL_CULL_FACE
flag | |
GL_DEPTH_TEST flag | |
GL_DITHER flag | |
GL_FOG flag | |
GL_LIGHTi
where 0 <= i < GL_MAX_LIGHTS | |
GL_LIGHTING flag | |
GL_LINE_SMOOTH flag | |
GL_LINE_STIPPLE flag | |
GL_COLOR_LOGIC_OP flag | |
GL_INDEX_LOGIC_OP flag | |
| GL_MAP1_x where x is a map type | |
| GL_MAP2_x where x is a map type | |
GL_MULTISAMPLE flag | |
GL_NORMALIZE flag | |
GL_POINT_SMOOTH flag | |
GL_POLYGON_OFFSET_LINE flag | |
GL_POLYGON_OFFSET_FILL flag | |
GL_POLYGON_OFFSET_POINT flag | |
GL_POLYGON_SMOOTH flag | |
GL_POLYGON_STIPPLE flag | |
GL_SAMPLE_ALPHA_TO_COVERAGE flag | |
GL_SAMPLE_ALPHA_TO_ONE flag | |
GL_SAMPLE_COVERAGE flag | |
GL_SCISSOR_TEST flag | |
GL_STENCIL_TEST flag | |
GL_TEXTURE_1D flag | |
GL_TEXTURE_2D flag | |
GL_TEXTURE_3D flag | |
| Flags GL_TEXTURE_GEN_x where x is S, T, R, or Q | |
GL_EVAL_BIT | GL_MAP1_x enable bits, where x is a map type |
| GL_MAP2_x enable bits, where x is a map type | |
| 1D grid endpoints and divisions | |
| 2D grid endpoints and divisions | |
GL_AUTO_NORMAL enable bit | |
GL_FOG_BIT | GL_FOG enable bit |
| Fog color | |
| Fog density | |
| Linear fog start | |
| Linear fog end | |
| Fog index | |
GL_FOG_MODE value | |
GL_HINT_BIT | GL_PERSPECTIVE_CORRECTION_HINT
setting |
GL_POINT_SMOOTH_HINT setting
| |
GL_LINE_SMOOTH_HINT setting | |
GL_POLYGON_SMOOTH_HINT setting | |
GL_FOG_HINT setting | |
GL_GENERATE_MIPMAP_HINT setting | |
GL_TEXTURE_COMPRESSION_HINT setting | |
GL_LIGHTING_BIT | GL_COLOR_MATERIAL enable bit
|
GL_COLOR_MATERIAL_FACE value | |
| Color material parameters that are tracking the current color | |
| Ambient scene color | |
GL_LIGHT_MODEL_LOCAL_VIEWER value | |
GL_LIGHT_MODEL_TWO_SIDE setting | |
GL_LIGHTING enable bit | |
| Enable bit for each light | |
| Ambient, diffuse, and specular intensity for each light | |
| Direction, position, exponent, and cutoff angle for each light | |
| Constant, linear, and quadratic attenuation factors for each light | |
| Ambient, diffuse, specular, and emissive color for each material | |
| Ambient, diffuse, and specular color indices for each material | |
| Specular exponent for each material | |
GL_SHADE_MODEL setting | |
GL_LINE_BIT | GL_LINE_SMOOTH flag |
GL_LINE_STIPPLE enable bit | |
| Line stipple pattern and repeat counter | |
| Line width | |
GL_LIST_BIT | GL_LIST_BASE setting |
GL_MULTISAMPLE_BIT | GL_MULTISAMPLE flag |
GL_SAMPLE_ALPHA_TO_COVERAGE flag | |
GL_SAMPLE_ALPHA_TO_ONE flag | |
GL_SAMPLE_COVERAGE flag | |
GL_SAMPLE_COVERAGE_VALUE value | |
GL_SAMPLE_COVERAGE_INVERT value | |
GL_PIXEL_MODE_BIT | GL_RED_BIAS and GL_RED_SCALE settings |
GL_GREEN_BIAS and GL_GREEN_SCALE values | |
GL_BLUE_BIAS and GL_BLUE_SCALE | |
GL_ALPHA_BIAS and GL_ALPHA_SCALE | |
GL_DEPTH_BIAS and GL_DEPTH_SCALE | |
GL_INDEX_OFFSET
and GL_INDEX_SHIFT values | |
GL_MAP_COLOR and GL_MAP_STENCIL flags | |
GL_ZOOM_X and GL_ZOOM_Y factors | |
GL_READ_BUFFER setting | |
GL_POINT_BIT | GL_POINT_SMOOTH flag |
| Point size | |
GL_POLYGON_BIT | GL_CULL_FACE enable bit |
GL_CULL_FACE_MODE value | |
GL_FRONT_FACE indicator | |
GL_POLYGON_MODE setting | |
GL_POLYGON_SMOOTH flag | |
GL_POLYGON_STIPPLE enable bit | |
GL_POLYGON_OFFSET_FILL flag | |
GL_POLYGON_OFFSET_LINE flag | |
GL_POLYGON_OFFSET_POINT flag | |
GL_POLYGON_OFFSET_FACTOR | |
GL_POLYGON_OFFSET_UNITS | |
GL_POLYGON_STIPPLE_BIT | Polygon stipple image |
GL_SCISSOR_BIT | GL_SCISSOR_TEST flag
|
| Scissor box | |
GL_STENCIL_BUFFER_BIT | GL_STENCIL_TEST enable
bit |
| Stencil function and reference value | |
| Stencil value mask | |
| Stencil fail, pass, and depth buffer pass actions | |
| Stencil buffer clear value | |
| Stencil buffer writemask | |
GL_TEXTURE_BIT | Enable bits for the four texture coordinates |
| Border color for each texture image | |
| Minification function for each texture image | |
| Magnification function for each texture image | |
| Texture coordinates and wrap mode for each texture image | |
| Color and mode for each texture environment | |
| Enable bits GL_TEXTURE_GEN_x, x is S, T, R, and Q | |
GL_TEXTURE_GEN_MODE setting for S, T, R, and Q | |
glTexGen plane equations for S, T, R, and Q | |
Current texture bindings (for example, GL_TEXTURE_BINDING_2D) | |
GL_TRANSFORM_BIT | Coefficients of the six clipping planes |
| Enable bits for the user-definable clipping planes | |
GL_MATRIX_MODE value | |
GL_NORMALIZE flag | |
GL_RESCALE_NORMAL flag | |
GL_VIEWPORT_BIT | Depth range (near and far) |
| Viewport origin and extent |
glPopAttrib restores the
values of the state variables saved with the last glPushAttrib
command. Those not saved are left unchanged.
It is an error to push attributes onto a full stack or to pop attributes off an empty stack. In either case, the error flag is set and no other change is made to GL state.
Initially, the attribute stack is empty.
maskSpecifies a mask that indicates which attributes to save. Values for mask are listed below.
GL_STACK_OVERFLOW is generated if glPushAttrib is called while
the attribute stack is full.
GL_STACK_UNDERFLOW is generated if glPopAttrib is called while
the attribute stack is empty.
GL_INVALID_OPERATION is generated if glPushAttrib or
glPopAttrib is executed between the execution of glBegin and the
corresponding execution of glEnd.
Not all values for GL state can be saved on the attribute stack. For
example, render mode state, and select and feedback state cannot be
saved. Client state must be saved with glPushClientAttrib.
The depth of the attribute stack depends on the implementation, but it must be at least 16.
For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported, pushing and popping texture state applies to all supported texture units.
glGet, glGetClipPlane, glGetError, glGetLight,
glGetMap, glGetMaterial, glGetPixelMap,
glGetPolygonStipple, glGetString, glGetTexEnv,
glGetTexGen, glGetTexImage, glGetTexLevelParameter,
glGetTexParameter, glIsEnabled, glPushClientAttrib
void glPushClientAttrib(int mask)
void glPopClientAttrib()
glPushClientAttrib takes one argument, a mask that indicates which
groups of client-state variables to save on the client attribute
stack. Symbolic constants are used to set bits in the mask. mask
is typically constructed by specifying the bitwise-or of several of
these constants together. The special mask
GL_CLIENT_ALL_ATTRIB_BITS can be used to save all stackable client
state.
The symbolic mask constants and their associated GL client state are as follows (the second column lists which attributes are saved):
GL_CLIENT_PIXEL_STORE_BIT Pixel storage modes
GL_CLIENT_VERTEX_ARRAY_BIT Vertex arrays (and enables)
glPopClientAttrib restores the values of the client-state variables
saved with the last glPushClientAttrib. Those not saved are left
unchanged.
It is an error to push attributes onto a full client attribute stack or to pop attributes off an empty stack. In either case, the error flag is set, and no other change is made to GL state.
Initially, the client attribute stack is empty.
maskSpecifies a mask that indicates which attributes to save. Values for mask are listed below.
GL_STACK_OVERFLOW is generated if glPushClientAttrib is called
while the attribute stack is full.
GL_STACK_UNDERFLOW is generated if glPopClientAttrib is called
while the attribute stack is empty.
glPushClientAttrib is available only if the GL version is 1.1 or
greater.
Not all values for GL client state can be saved on the attribute stack. For example, select and feedback state cannot be saved.
The depth of the attribute stack depends on the implementation, but it must be at least 16.
Use glPushAttrib and glPopAttrib to push and restore state that
is kept on the server. Only pixel storage modes and vertex array state
may be pushed and popped with glPushClientAttrib and
glPopClientAttrib.
For OpenGL versions 1.3 and greater, or when the ARB_multitexture extension is supported, pushing and popping client vertex array state applies to all supported texture units, and the active client texture state.
glColorPointer, glDisableClientState, glEdgeFlagPointer,
glEnableClientState, glFogCoordPointer, glGet, glGetError,
glIndexPointer, glNormalPointer, glNewList, glPixelStore,
glPushAttrib, glTexCoordPointer, glVertexPointer
void glPushMatrix()
void glPopMatrix()
There is a stack of matrices for each of the matrix modes. In
GL_MODELVIEW mode, the stack depth is at least 32. In the other
modes, GL_COLOR, GL_PROJECTION, and GL_TEXTURE, the depth is
at least 2. The current matrix in any mode is the matrix on the top of
the stack for that mode.
glPushMatrix pushes the current matrix stack down by one,
duplicating the current matrix. That is, after a glPushMatrix call,
the matrix on top of the stack is identical to the one below it.
glPopMatrix pops the current matrix stack, replacing the current
matrix with the one below it on the stack.
Initially, each of the stacks contains one matrix, an identity matrix.
It is an error to push a full matrix stack or to pop a matrix stack that contains only a single matrix. In either case, the error flag is set and no other change is made to GL state.
GL_STACK_OVERFLOW is generated if glPushMatrix is called while
the current matrix stack is full.
GL_STACK_UNDERFLOW is generated if glPopMatrix is called while
the current matrix stack contains only a single matrix.
GL_INVALID_OPERATION is generated if glPushMatrix or
glPopMatrix is executed between the execution of glBegin and the
corresponding execution of glEnd.
glFrustum, glLoadIdentity, glLoadMatrix,
glLoadTransposeMatrix, glMatrixMode, glMultMatrix,
glMultTransposeMatrix, glOrtho, glRotate, glScale,
glTranslate, glViewport
void glPushName(int name)
void glPopName()
The name stack is used during selection mode to allow sets of rendering commands to be uniquely identified. It consists of an ordered set of unsigned integers and is initially empty.
glPushName causes name to be pushed onto the name stack.
glPopName pops one name off the top of the stack.
The maximum name stack depth is implementation-dependent; call
GL_MAX_NAME_STACK_DEPTH to find out the value for a particular
implementation. It is an error to push a name onto a full stack or to
pop a name off an empty stack. It is also an error to manipulate the
name stack between the execution of glBegin and the corresponding
execution of glEnd. In any of these cases, the error flag is set
and no other change is made to GL state.
The name stack is always empty while the render mode is not
GL_SELECT. Calls to glPushName or glPopName while the render
mode is not GL_SELECT are ignored.
nameSpecifies a name that will be pushed onto the name stack.
GL_STACK_OVERFLOW is generated if glPushName is called while the
name stack is full.
GL_STACK_UNDERFLOW is generated if glPopName is called while the
name stack is empty.
GL_INVALID_OPERATION is generated if glPushName or glPopName
is executed between a call to glBegin and the corresponding call to
glEnd.
glInitNames, glLoadName, glRenderMode, glSelectBuffer
void glRasterPos(float|int x, float|int y, float|int|void z, float|int|void w)
void glRasterPos(array(float|int) v)
The GL maintains a 3D position in window coordinates. This position,
called the raster position, is used to position pixel and bitmap write
operations. It is maintained with subpixel accuracy. See glBitmap,
glDrawPixels, and glCopyPixels.
The current raster position consists of three window coordinates (x, y, z), a clip coordinate value (w), an eye coordinate distance, a valid bit, and associated color data and texture coordinates. The w coordinate is a clip coordinate, because w is not projected to window coordinates. The variable z defaults to 0 and w defaults to 1.
The object coordinates presented by glRasterPos are treated just
like those of a glVertex command: They are transformed by the
current modelview and projection matrices and passed to the clipping
stage. If the vertex is not culled, then it is projected and scaled to
window coordinates, which become the new current raster position, and
the GL_CURRENT_RASTER_POSITION_VALID flag is set. If the vertex
is culled, then the valid bit is cleared and the current raster
position and associated color and texture coordinates are undefined.
The current raster position also includes some associated color data
and texture coordinates. If lighting is enabled, then
GL_CURRENT_RASTER_COLOR (in RGBA mode) or
GL_CURRENT_RASTER_INDEX (in color index mode) is set to the color
produced by the lighting calculation (see glLight, glLightModel,
and glShadeModel). If lighting is disabled, current color (in RGBA
mode, state variable GL_CURRENT_COLOR) or color index (in color
index mode, state variable GL_CURRENT_INDEX) is used to update the
current raster color. GL_CURRENT_RASTER_SECONDARY_COLOR (in RGBA
mode) is likewise updated.
Likewise, GL_CURRENT_RASTER_TEXTURE_COORDS is updated as a function
of GL_CURRENT_TEXTURE_COORDS, based on the texture matrix and the
texture generation functions (see glTexGen). Finally, the distance
from the origin of the eye coordinate system to the vertex as
transformed by only the modelview matrix replaces
GL_CURRENT_RASTER_DISTANCE.
Initially, the current raster position is (0, 0, 0, 1), the current
raster distance is 0, the valid bit is set, the associated RGBA color
is (1, 1, 1, 1), the associated color index is 1, and the associated
texture coordinates are (0, 0, 0, 1). In RGBA mode,
GL_CURRENT_RASTER_INDEX is always 1; in color index mode, the
current raster RGBA color always maintains its initial value.
xyzwSpecify the x, y, z, and w object coordinates (if present) for the raster position.
vSpecifies an array of two, three, or four elements, specifying x, y, z, and w coordinates, respectively.
GL_INVALID_OPERATION is generated if glRasterPos is executed
between the execution of glBegin and the corresponding execution of
glEnd.
The raster position is modified by glRasterPos, glBitmap, and
glWindowPos.
When the raster position coordinates are invalid, drawing commands that are based on the raster position are ignored (that is, they do not result in changes to GL state).
Calling glDrawElements or glDrawRangeElements may leave the
current color or index indeterminate. If glRasterPos is executed
while the current color or index is indeterminate, the current raster
color or current raster index remains indeterminate.
To set a valid raster position outside the viewport, first set a valid
raster position, then call glBitmap with NULL as the bitmap
parameter.
When the ARB_imaging extension is supported, there are distinct
raster texture coordinates for each texture unit. Each texture unit's
current raster texture coordinates are updated by glRasterPos.
glBitmap, glCopyPixels, glDrawArrays, glDrawElements,
glDrawRangeElements, glDrawPixels, glMultiTexCoord,
glTexCoord, glTexGen, glVertex, glWindowPos
void glReadBuffer(int mode)
glReadBuffer specifies a color buffer as the source for subsequent
glReadPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, and glCopyPixels commands. mode
accepts one of twelve or more predefined values. (GL_AUX0 through
GL_AUX3 are always defined.) In a fully configured system,
GL_FRONT, GL_LEFT, and GL_FRONT_LEFT all name the front left
buffer, GL_FRONT_RIGHT and GL_RIGHT name the front right buffer,
and GL_BACK_LEFT and GL_BACK name the back left buffer.
Nonstereo double-buffered configurations have only a front left and a
back left buffer. Single-buffered configurations have a front left and
a front right buffer if stereo, and only a front left buffer if
nonstereo. It is an error to specify a nonexistent buffer to
glReadBuffer.
mode is initially GL_FRONT in single-buffered configurations
and GL_BACK in double-buffered configurations.
modeSpecifies a color buffer. Accepted values are GL_FRONT_LEFT,
GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT,
GL_BACK, GL_LEFT, GL_RIGHT, and GL_AUX0 through
GL_AUX3i, where i is between 0 and the value of
GL_AUX_BUFFERS minus 1.
GL_INVALID_ENUM is generated if mode is not one of the twelve
(or more) accepted values.
GL_INVALID_OPERATION is generated if mode specifies a buffer
that does not exist.
GL_INVALID_OPERATION is generated if glReadBuffer is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glDrawBuffer, glReadPixels
void glReadPixels(int x, int y, int width, int height, int format, int type, System.Memory data)
glReadPixels returns pixel data from the frame buffer, starting
with the pixel whose lower left corner is at location (x,
y), into client memory starting at location data. Several
parameters control the processing of the pixel data before it is
placed into client memory. These parameters are set with three
commands: glPixelStore, glPixelTransfer, and glPixelMap. This
reference page describes the effects on glReadPixels of most, but
not all of the parameters specified by these three commands.
If a non-zero named buffer object is bound to the
GL_PIXEL_PACK_BUFFER target (see glBindBuffer) while a block of
pixels is requested, data is treated as a byte offset into the
buffer object's data store rather than a pointer to client memory.
When the ARB_imaging extension is supported, the pixel data may be processed by additional operations including color table lookup, color matrix transformations, convolutions, histograms, and minimum and maximum pixel value computations.
glReadPixels returns values from each pixel with lower left corner
at
(x+i, y+j)
for
0<=i<width
and
0<=j<height
. This pixel is said to be the ith pixel in the jth row.
Pixels are returned in row order from the lowest to the highest row,
left to right in each row.
format specifies the format for the returned pixel values; accepted values are:
GL_COLOR_INDEX | Color indices are read from the color buffer selected by |
GL_STENCIL_INDEX | Stencil values are read from the stencil buffer. Each index is
converted to fixed point, shifted left or right depending on the value
and sign of |
GL_DEPTH_COMPONENT | Depth values are read from the depth buffer. Each component is
converted to floating point such that the minimum depth value maps to
0 and the maximum value maps to 1. Each component is then multiplied
by |
GL_RED | |
GL_GREEN | |
GL_BLUE | |
GL_ALPHA | |
GL_RGB | |
GL_BGR | |
GL_RGBA | |
GL_BGRA | |
GL_LUMINANCE | |
GL_LUMINANCE_ALPHA | Processing differs depending on whether color buffers store
color indices or RGBA color components. If color indices are stored,
they are read from the color buffer selected by If RGBA color components are
stored in the color buffers, they are read from the color buffer
selected by Unneeded data is then discarded. For example, |
glPixelTransfer. The lookup table contents
themselves are specified by glPixelMap.
Finally, the indices or components are converted to the proper format,
as specified by type. If format is GL_COLOR_INDEX or
GL_STENCIL_INDEX and type is not GL_FLOAT, each index is
masked with the mask value given in the following table. If type
is GL_FLOAT, then each integer index is converted to
single-precision floating-point format.
If format is GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA,
GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, or
GL_LUMINANCE_ALPHA and type is not GL_FLOAT, each component
is multiplied by the multiplier shown in the following table. If type
is GL_FLOAT, then each component is passed as is (or converted to
the client's single-precision floating-point format if it is different
from the one used by the GL).
| type | Index Mask | Component Conversion |
GL_UNSIGNED_BYTE | 28-1 | (28-1)c |
GL_BYTE | 27-1 | (28-1)c-1/2 |
GL_BITMAP | 1 | 1 |
GL_UNSIGNED_SHORT | 216-1 | (216-1)c |
GL_SHORT | 215-1 | (216-1)c-1/2 |
GL_UNSIGNED_INT | 232-1 | (232-1)c |
GL_INT | 231-1 | (232-1)c-1/2 |
GL_FLOAT | none | c |
GL_COLOR_INDEX,
GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, GL_RED, GL_GREEN,
GL_BLUE, GL_ALPHA, or GL_LUMINANCE, a single value is
returned and the data for the ith pixel in the jth row is
placed in location
(j)width+i
. GL_RGB and GL_BGR return three values, GL_RGBA and
GL_BGRA return four values, and GL_LUMINANCE_ALPHA returns two
values for each pixel, with all values corresponding to a single pixel
occupying contiguous space in data. Storage parameters set by
glPixelStore, such as GL_PACK_LSB_FIRST and
GL_PACK_SWAP_BYTES, affect the way that data is written into
memory. See glPixelStore for a description.
xySpecify the window coordinates of the first pixel that is read from the frame buffer. This location is the lower left corner of a rectangular block of pixels.
widthheightSpecify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
formatSpecifies the format of the pixel data. The following symbolic values
are accepted: GL_COLOR_INDEX, GL_STENCIL_INDEX,
GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
typeSpecifies the data type of the pixel data. Must be one of
GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,
GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT,
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV.
dataReturns the pixel data.
GL_INVALID_ENUM is generated if format or type is not an
accepted value.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not GL_COLOR_INDEX or GL_STENCIL_INDEX.
GL_INVALID_VALUE is generated if either width or height
is negative.
GL_INVALID_OPERATION is generated if format is
GL_COLOR_INDEX and the color buffers store RGBA color components.
GL_INVALID_OPERATION is generated if format is
GL_STENCIL_INDEX and there is no stencil buffer.
GL_INVALID_OPERATION is generated if format is
GL_DEPTH_COMPONENT and there is no depth buffer.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
The formats GL_BGR, and GL_BGRA and types
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV
are available only if the GL version is 1.2 or greater.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and the buffer object's
data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and the data would be
packed to the buffer object such that the memory writes required would
exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_PACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glReadPixels is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Values for pixels that lie outside the window connected to the current GL context are undefined.
If an error is generated, no change is made to the contents of data.
glCopyPixels, glDrawPixels, glPixelMap, glPixelStore,
glPixelTransfer, glReadBuffer
void glRenderMode(int mode)
glRenderMode sets the rasterization mode. It takes one argument,
mode, which can assume one of three predefined values:
GL_RENDER | Render mode. Primitives are rasterized, producing pixel fragments, which are written into the frame buffer. This is the normal mode and also the default mode. |
GL_SELECT | Selection mode. No pixel fragments are produced, and no change
to the frame buffer contents is made. Instead, a record of the names
of primitives that would have been drawn if the render mode had been
|
GL_FEEDBACK | Feedback mode. No pixel fragments are produced, and no change to
the frame buffer contents is made. Instead, the coordinates and
attributes of vertices that would have been drawn if the render mode
had been |
glRenderMode is determined by the
render mode at the time glRenderMode is called, rather than by
mode. The values returned for the three render modes are as
follows:
GL_RENDER | 0. |
GL_SELECT | The number of hit records transferred to the select buffer. |
GL_FEEDBACK | The number of values (not vertices) transferred to the feedback buffer. |
glSelectBuffer and glFeedbackBuffer reference
pages for more details concerning selection and feedback operation.
modeSpecifies the rasterization mode. Three values are accepted:
GL_RENDER, GL_SELECT, and GL_FEEDBACK. The initial value is
GL_RENDER.
GL_INVALID_ENUM is generated if mode is not one of the three
accepted values.
GL_INVALID_OPERATION is generated if glSelectBuffer is called
while the render mode is GL_SELECT, or if glRenderMode is called
with argument GL_SELECT before glSelectBuffer is called at least
once.
GL_INVALID_OPERATION is generated if glFeedbackBuffer is called
while the render mode is GL_FEEDBACK, or if glRenderMode is
called with argument GL_FEEDBACK before glFeedbackBuffer is
called at least once.
GL_INVALID_OPERATION is generated if glRenderMode is executed
between the execution of glBegin and the corresponding execution of
glEnd.
If an error is generated, glRenderMode returns 0 regardless of the
current render mode.
glFeedbackBuffer, glInitNames, glLoadName, glPassThrough,
glPushName, glSelectBuffer
void glRotate(float|int|array(float|int) angle, float|int|void x, float|int|void y, float|int|void z)
glRotate produces a rotation of angle degrees around the
vector (x, y, z). The current matrix (see
glMatrixMode) is multiplied by a rotation matrix with the product
replacing the current matrix, as if glMultMatrix were called with
the following matrix as its argument:
(
| x2(1-c)+c | xy(1-c)-zs | xz(1-c)+ys | 0 |
| yx(1-c)+zs | y2(1-c)+c | yz(1-c)-xs | 0 |
| xz(1-c)-ys | yz(1-c)+xs | z2(1-c)+c | 0 |
| 0 | 0 | 0 | 1 |
Where c=cos(angle) , s=sin(angle) , and ∥(x, y, z)∥=1 (if not, the GL will normalize this vector).
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all
objects drawn after glRotate is called are rotated. Use
glPushMatrix and glPopMatrix to save and restore the unrotated
coordinate system.
angleSpecifies the angle of rotation, in degrees.
xyzSpecify the x, y, and z coordinates of a vector, respectively.
GL_INVALID_OPERATION is generated if glRotate is executed
between the execution of glBegin and the corresponding execution of
glEnd.
This rotation follows the right-hand rule, so if the vector (x, y, z) points toward the user, the rotation will be counterclockwise.
glMatrixMode, glMultMatrix, glPushMatrix, glScale,
glTranslate
void glScale(float|int|array(float|int) x, float|int|void y, float|int|void z)
glScale produces a nonuniform scaling along the x, y, and
z axes. The three parameters indicate the desired scale factor
along each of the three axes.
The current matrix (see glMatrixMode) is multiplied by this scale
matrix, and the product replaces the current matrix as if
glMultMatrix were called with the following matrix as its argument:
(
| x | 0 | 0 | 0 |
| 0 | y | 0 | 0 |
| 0 | 0 | z | 0 |
| 0 | 0 | 0 | 1 |
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all
objects drawn after glScale is called are scaled.
Use glPushMatrix and glPopMatrix to save and restore the
unscaled coordinate system.
xyzSpecify scale factors along the x, y, and z axes, respectively.
GL_INVALID_OPERATION is generated if glScale is executed between
the execution of glBegin and the corresponding execution of
glEnd.
If scale factors other than 1 are applied to the modelview matrix and
lighting is enabled, lighting often appears wrong. In that case,
enable automatic normalization of normals by calling glEnable with
the argument GL_NORMALIZE.
glMatrixMode, glMultMatrix, glPushMatrix, glRotate,
glTranslate
void glScissor(int x, int y, int width, int height)
glScissor defines a rectangle, called the scissor box, in window
coordinates. The first two arguments, x and y, specify the
lower left corner of the box. width and height specify the
width and height of the box.
To enable and disable the scissor test, call glEnable and
glDisable with argument GL_SCISSOR_TEST. The test is initially
disabled. While the test is enabled, only pixels that lie within the
scissor box can be modified by drawing commands. Window coordinates
have integer values at the shared corners of frame buffer pixels.
glScissor(0,0,1,1) allows modification of only the lower left
pixel in the window, and glScissor(0,0,0,0) doesn't allow
modification of any pixels in the window.
When the scissor test is disabled, it is as though the scissor box includes the entire window.
xySpecify the lower left corner of the scissor box. Initially (0, 0).
widthheightSpecify the width and height of the scissor box. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
GL_INVALID_VALUE is generated if either width or height
is negative.
GL_INVALID_OPERATION is generated if glScissor is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glEnable, glViewport
void glSelectBuffer(int size, System.Memory buffer)
glSelectBuffer has two arguments: buffer is an array of
unsigned integers, and size indicates the size of the array.
buffer returns values from the name stack (see glInitNames,
glLoadName, glPushName) when the rendering mode is GL_SELECT
(see glRenderMode). glSelectBuffer must be issued before
selection mode is enabled, and it must not be issued while the
rendering mode is GL_SELECT.
A programmer can use selection to determine which primitives are drawn into some region of a window. The region is defined by the current modelview and perspective matrices.
In selection mode, no pixel fragments are produced from rasterization.
Instead, if a primitive or a raster position intersects the clipping
volume defined by the viewing frustum and the user-defined clipping
planes, this primitive causes a selection hit. (With polygons, no hit
occurs if the polygon is culled.) When a change is made to the name
stack, or when glRenderMode is called, a hit record is copied to
buffer if any hits have occurred since the last such event (name
stack change or glRenderMode call). The hit record consists of the
number of names in the name stack at the time of the event, followed
by the minimum and maximum depth values of all vertices that hit since
the previous event, followed by the name stack contents, bottom name
first.
Depth values (which are in the range [0,1]) are multiplied by 232-1 , before being placed in the hit record.
An internal index into buffer is reset to 0 whenever selection mode is entered. Each time a hit record is copied into buffer, the index is incremented to point to the cell just past the end of the block of names\(emthat is, to the next available cell If the hit record is larger than the number of remaining locations in buffer, as much data as can fit is copied, and the overflow flag is set. If the name stack is empty when a hit record is copied, that record consists of 0 followed by the minimum and maximum depth values.
To exit selection mode, call glRenderMode with an argument other
than GL_SELECT. Whenever glRenderMode is called while the render
mode is GL_SELECT, it returns the number of hit records copied to
buffer, resets the overflow flag and the selection buffer
pointer, and initializes the name stack to be empty. If the overflow
bit was set when glRenderMode was called, a negative hit record
count is returned.
sizeSpecifies the size of buffer.
bufferReturns the selection data.
GL_INVALID_VALUE is generated if size is negative.
GL_INVALID_OPERATION is generated if glSelectBuffer is called
while the render mode is GL_SELECT, or if glRenderMode is called
with argument GL_SELECT before glSelectBuffer is called at least
once.
GL_INVALID_OPERATION is generated if glSelectBuffer is executed
between the execution of glBegin and the corresponding execution of
glEnd.
The contents of buffer is undefined until glRenderMode is
called with an argument other than GL_SELECT.
glBegin/glEnd primitives and calls to glRasterPos can result
in hits. glWindowPos will always generate a selection hit.
glFeedbackBuffer, glInitNames, glLoadName, glPushName,
glRenderMode
void glShadeModel(int mode)
GL primitives can have either flat or smooth shading. Smooth shading, the default, causes the computed colors of vertices to be interpolated as the primitive is rasterized, typically assigning different colors to each resulting pixel fragment. Flat shading selects the computed color of just one vertex and assigns it to all the pixel fragments generated by rasterizing a single primitive. In either case, the computed color of a vertex is the result of lighting if lighting is enabled, or it is the current color at the time the vertex was specified if lighting is disabled.
Flat and smooth shading are indistinguishable for points. Starting
when glBegin is issued and counting vertices and primitives from 1,
the GL gives each flat-shaded line segment i the computed color
of vertex
i+1
, its second vertex. Counting similarly from 1, the GL gives each
flat-shaded polygon the computed color of the vertex listed in the
following table. This is the last vertex to specify the polygon in all
cases except single polygons, where the first vertex specifies the
flat-shaded color.
| Primitive Type of Polygon i | Vertex |
| Single polygon ( i==1) | 1 |
| Triangle strip | i+2 |
| Triangle fan | i+2 |
| Independent triangle | 3i |
| Quad strip | 2i+2 |
| Independent quad | 4i |
glShadeModel with mode set to
GL_FLAT and GL_SMOOTH, respectively.
modeSpecifies a symbolic value representing a shading technique. Accepted
values are GL_FLAT and GL_SMOOTH. The initial value is
GL_SMOOTH.
GL_INVALID_ENUM is generated if mode is any value other than
GL_FLAT or GL_SMOOTH.
GL_INVALID_OPERATION is generated if glShadeModel is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glBegin, glColor, glLight, glLightModel
void glStencilFunc(int func, int ref, int mask)
Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. Stencil planes are first drawn into using GL drawing primitives, then geometry and images are rendered using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.
The stencil test conditionally eliminates a pixel based on the outcome
of a comparison between the reference value and the value in the
stencil buffer. To enable and disable the test, call glEnable and
glDisable with argument GL_STENCIL_TEST. To specify actions
based on the outcome of the stencil test, call glStencilOp or
glStencilOpSeparate.
There can be two separate sets of func, ref, and mask
parameters; one affects back-facing polygons, and the other affects
front-facing polygons as well as other non-polygon primitives.
glStencilFunc sets both front and back stencil state to the same
values. Use glStencilFuncSeparate to set front and back stencil
state to different values.
func is a symbolic constant that determines the stencil comparison function. It accepts one of eight values, shown in the following list. ref is an integer reference value that is used in the stencil comparison. It is clamped to the range [0, 2n-1] , where n is the number of bitplanes in the stencil buffer. mask is bitwise ANDed with both the reference value and the stored stencil value, with the ANDed values participating in the comparison.
If stencil represents the value stored in the corresponding
stencil buffer location, the following list shows the effect of each
comparison function that can be specified by func. Only if the
comparison succeeds is the pixel passed through to the next stage in
the rasterization process (see glStencilOp). All tests treat
stencil values as unsigned integers in the range
[0, 2n-1]
, where n is the number of bitplanes in the stencil buffer.
The following values are accepted by func:
GL_NEVER | Always fails. |
GL_LESS | Passes if ( ref & mask ) < ( stencil & mask ). |
GL_LEQUAL | Passes if ( ref & mask ) <= ( stencil & mask ). |
GL_GREATER | Passes if ( ref & mask ) > ( stencil & mask ). |
GL_GEQUAL | Passes if ( ref & mask ) >= ( stencil & mask ). |
GL_EQUAL | Passes if ( ref & mask ) = ( stencil & mask ). |
GL_NOTEQUAL | Passes if ( ref & mask ) != ( stencil & mask ). |
GL_ALWAYS | Always passes. |
funcSpecifies the test function. Eight symbolic constants are valid:
GL_NEVER, GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL,
GL_EQUAL, GL_NOTEQUAL, and GL_ALWAYS. The initial value is
GL_ALWAYS.
refSpecifies the reference value for the stencil test. ref is clamped to the range [0, 2n-1] , where n is the number of bitplanes in the stencil buffer. The initial value is 0.
maskSpecifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. The initial value is all 1's.
GL_INVALID_ENUM is generated if func is not one of the eight
accepted values.
GL_INVALID_OPERATION is generated if glStencilFunc is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Initially, the stencil test is disabled. If there is no stencil buffer, no stencil modification can occur and it is as if the stencil test always passes.
glStencilFunc is the same as calling glStencilFuncSeparate with
face set to GL_FRONT_AND_BACK.
glAlphaFunc, glBlendFunc, glDepthFunc, glEnable,
glLogicOp, glStencilFuncSeparate, glStencilMask,
glStencilMaskSeparate, glStencilOp, glStencilOpSeparate
void glStencilMask(int mask)
glStencilMask controls the writing of individual bits in the
stencil planes. The least significant n bits of mask, where
n is the number of bits in the stencil buffer, specify a mask.
Where a 1 appears in the mask, it's possible to write to the
corresponding bit in the stencil buffer. Where a 0 appears, the
corresponding bit is write-protected. Initially, all bits are enabled
for writing.
There can be two separate mask writemasks; one affects
back-facing polygons, and the other affects front-facing polygons as
well as other non-polygon primitives. glStencilMask sets both front
and back stencil writemasks to the same values. Use
glStencilMaskSeparate to set front and back stencil writemasks to
different values.
maskSpecifies a bit mask to enable and disable writing of individual bits in the stencil planes. Initially, the mask is all 1's.
GL_INVALID_OPERATION is generated if glStencilMask is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glStencilMask is the same as calling glStencilMaskSeparate with
face set to GL_FRONT_AND_BACK.
glColorMask, glDepthMask, glIndexMask, glStencilFunc,
glStencilFuncSeparate, glStencilMaskSeparate, glStencilOp,
glStencilOpSeparate
void glStencilOp(int sfail, int dpfail, int dppass)
Stenciling, like depth-buffering, enables and disables drawing on a per-pixel basis. You draw into the stencil planes using GL drawing primitives, then render geometry and images, using the stencil planes to mask out portions of the screen. Stenciling is typically used in multipass rendering algorithms to achieve special effects, such as decals, outlining, and constructive solid geometry rendering.
The stencil test conditionally eliminates a pixel based on the outcome
of a comparison between the value in the stencil buffer and a
reference value. To enable and disable the test, call glEnable and
glDisable with argument GL_STENCIL_TEST; to control it, call
glStencilFunc or glStencilFuncSeparate.
There can be two separate sets of sfail, dpfail, and
dppass parameters; one affects back-facing polygons, and the
other affects front-facing polygons as well as other non-polygon
primitives. glStencilOp sets both front and back stencil state to
the same values. Use glStencilOpSeparate to set front and back
stencil state to different values.
glStencilOp takes three arguments that indicate what happens to the
stored stencil value while stenciling is enabled. If the stencil test
fails, no change is made to the pixel's color or depth buffers, and
sfail specifies what happens to the stencil buffer contents. The
following eight actions are possible.
GL_KEEP | Keeps the current value. |
GL_ZERO | Sets the stencil buffer value to 0. |
GL_REPLACE | Sets the stencil buffer value to ref, as specified by
|
GL_INCR | Increments the current stencil buffer value. Clamps to the maximum representable unsigned value. |
GL_INCR_WRAP | Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing the maximum representable unsigned value. |
GL_DECR | Decrements the current stencil buffer value. Clamps to 0. |
GL_DECR_WRAP | Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of zero. |
GL_INVERT | Bitwise inverts the current stencil buffer value. |
GL_STENCIL_BITS.
The other two arguments to glStencilOp specify stencil buffer
actions that depend on whether subsequent depth buffer tests succeed
(dppass) or fail (dpfail) (see glDepthFunc). The actions
are specified using the same eight symbolic constants as sfail.
Note that dpfail is ignored when there is no depth buffer, or
when the depth buffer is not enabled. In these cases, sfail and
dppass specify stencil action when the stencil test fails and
passes, respectively.
sfailSpecifies the action to take when the stencil test fails. Eight
symbolic constants are accepted: GL_KEEP, GL_ZERO,
GL_REPLACE, GL_INCR, GL_INCR_WRAP, GL_DECR,
GL_DECR_WRAP, and GL_INVERT. The initial value is GL_KEEP.
dpfailSpecifies the stencil action when the stencil test passes, but the
depth test fails. dpfail accepts the same symbolic constants as
sfail. The initial value is GL_KEEP.
dppassSpecifies the stencil action when both the stencil test and the depth
test pass, or when the stencil test passes and either there is no
depth buffer or depth testing is not enabled. dppass accepts the
same symbolic constants as sfail. The initial value is
GL_KEEP.
GL_INVALID_ENUM is generated if sfail, dpfail, or
dppass is any value other than the eight defined constant values.
GL_INVALID_OPERATION is generated if glStencilOp is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GL_DECR_WRAP and GL_INCR_WRAP are available only if the GL
version is 1.4 or greater.
Initially the stencil test is disabled. If there is no stencil buffer,
no stencil modification can occur and it is as if the stencil tests
always pass, regardless of any call to glStencilOp.
glStencilOp is the same as calling glStencilOpSeparate with
face set to GL_FRONT_AND_BACK.
glAlphaFunc, glBlendFunc, glDepthFunc, glEnable,
glLogicOp, glStencilFunc, glStencilFuncSeparate,
glStencilMask, glStencilMaskSeparate, glStencilOpSeparate
void glTexCoord(float|int s, float|int|void t, float|int|void r, float|int|void q)
void glTexCoord(array(float|int) v)
glTexCoord specifies texture coordinates in one, two, three, or
four dimensions. glTexCoord sets the current texture coordinates to
(s, 0, 0, 1); a call to glTexCoord sets them to (s,
t, 0, 1). Similarly, glTexCoord specifies the texture
coordinates as (s, t, r, 1), and glTexCoord defines
all four components explicitly as (s, t, r, q).
The current texture coordinates are part of the data that is associated with each vertex and with the current raster position. Initially, the values for s, t, r, and q are (0, 0, 0, 1).
strqSpecify s, t, r, and q texture coordinates. Not all parameters are present in all forms of the command.
vSpecifies an array of one, two, three, or four elements, which in turn specify the s, t, r, and q texture coordinates.
The current texture coordinates can be updated at any time. In
particular, glTexCoord can be called between a call to glBegin
and the corresponding call to glEnd.
When the ARB_imaging extension is supported, glTexCoord
always updates texture unit GL_TEXTURE0.
glMultiTexCoord, glTexCoordPointer, glVertex
void glTexCoordPointer(int size, int type, int stride, System.Memory pointer)
glTexCoordPointer specifies the location and data format of an
array of texture coordinates to use when rendering. size
specifies the number of coordinates per texture coordinate set, and
must be 1, 2, 3, or 4. type specifies the data type of each
texture coordinate, and stride specifies the byte stride from one
texture coordinate set to the next, allowing vertices and attributes
to be packed into a single array or stored in separate arrays.
(Single-array storage may be more efficient on some implementations;
see glInterleavedArrays.)
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while a texture coordinate array is
specified, pointer is treated as a byte offset into the buffer
object's data store. Also, the buffer object binding
(GL_ARRAY_BUFFER_BINDING) is saved as texture coordinate vertex
array client-side state (GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING).
When a texture coordinate array is specified, size, type, stride, and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable a texture coordinate array, call
glEnableClientState and glDisableClientState with the argument
GL_TEXTURE_COORD_ARRAY. If enabled, the texture coordinate array is
used when glArrayElement, glDrawArrays, glMultiDrawArrays,
glDrawElements, glMultiDrawElements, or glDrawRangeElements
is called.
sizeSpecifies the number of coordinates per array element. Must be 1, 2, 3, or 4. The initial value is 4.
typeSpecifies the data type of each texture coordinate. Symbolic constants
GL_SHORT, GL_INT, GL_FLOAT, or GL_DOUBLE are accepted. The
initial value is GL_FLOAT.
strideSpecifies the byte offset between consecutive texture coordinate sets. If stride is 0, the array elements are understood to be tightly packed. The initial value is 0.
pointerSpecifies a pointer to the first coordinate of the first texture coordinate set in the array. The initial value is 0.
GL_INVALID_VALUE is generated if size is not 1, 2, 3, or 4.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
glTexCoordPointer is available only if the GL version is 1.1 or
greater.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glTexCoordPointer
updates the texture coordinate array state of the active client
texture unit, specified with glClientActiveTexture.
Each texture coordinate array is initially disabled and isn't accessed
when glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glTexCoordPointer is not allowed between the execution
of glBegin and the corresponding execution of glEnd, but an
error may or may not be generated. If no error is generated, the
operation is undefined.
glTexCoordPointer is typically implemented on the client side.
Texture coordinate array parameters are client-side state and are
therefore not saved or restored by glPushAttrib and glPopAttrib.
Use glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glClientActiveTexture,
glColorPointer, glDisableClientState, glDrawArrays,
glDrawElements, glDrawRangeElements, glEdgeFlagPointer,
glEnableClientState, glFogCoordPointer, glIndexPointer,
glInterleavedArrays, glMultiDrawArrays, glMultiDrawElements,
glMultiTexCoord, glNormalPointer, glPopClientAttrib,
glPushClientAttrib, glSecondaryColorPointer, glTexCoord,
glVertexAttribPointer, glVertexPointer
void glTexEnv(int target, int pname, float|int|array(float|int) param)
A texture environment specifies how texture values are interpreted
when a fragment is textured. When target is
GL_TEXTURE_FILTER_CONTROL, pname must be
GL_TEXTURE_LOD_BIAS. When target is GL_TEXTURE_ENV,
pname can be GL_TEXTURE_ENV_MODE, GL_TEXTURE_ENV_COLOR,
GL_COMBINE_RGB, GL_COMBINE_ALPHA, GL_RGB_SCALE,
GL_ALPHA_SCALE, GL_SRC0_RGB, GL_SRC1_RGB, GL_SRC2_RGB,
GL_SRC0_ALPHA, GL_SRC1_ALPHA, or GL_SRC2_ALPHA.
If pname is GL_TEXTURE_ENV_MODE, then params is (or
points to) the symbolic name of a texture function. Six texture
functions may be specified: GL_ADD, GL_MODULATE, GL_DECAL,
GL_BLEND, GL_REPLACE, or GL_COMBINE.
The following table shows the correspondence of filtered texture values Rt, Gt, Bt, At, Lt, It to texture source components. Cs and As are used by the texture functions described below.
| Texture Base Internal Format | Cs | As |
GL_ALPHA | (0, 0, 0) | At |
GL_LUMINANCE | ( Lt, Lt, Lt ) | 1 |
GL_LUMINANCE_ALPHA | ( Lt, Lt, Lt ) | At |
GL_INTENSITY | ( It, It, It ) | It |
GL_RGB | ( Rt, Gt, Bt ) | 1 |
GL_RGBA | ( Rt, Gt, Bt ) | At |
glTexParameter) and
produces an RGBA color for that fragment. The following table shows
how the RGBA color is produced for each of the first five texture
functions that can be chosen. C is a triple of color values (RGB)
and A is the associated alpha value. RGBA values extracted from a
texture image are in the range [0,1]. The subscript p refers to
the color computed from the previous texture stage (or the incoming
fragment if processing texture stage 0), the subscript s to the
texture source color, the subscript c to the texture environment
color, and the subscript v indicates a value produced by the
texture function.
| Texture Base Internal Format | Value | GL_REPLACE Function | GL_MODULATE Function
| GL_DECAL Function | GL_BLEND
Function | GL_ADD Function |
GL_ALPHA | Cv= | Cp | Cp | undefined | Cp | Cp |
| Av= | As | ApAs | Av=ApAs | ApAs | ||
GL_LUMINANCE | Cv= | Cs | CpCs | undefined | Cp(1-Cs)+CcCs | Cp+Cs |
| (or 1) | Av= | Ap | Ap | Ap | Ap | |
GL_LUMINANCE_ALPHA | Cv= | Cs | CpCs | undefined | Cp(1-Cs)+CcCs | Cp+Cs |
| (or 2) | Av= | As | ApAs | ApAs | ApAs | |
GL_INTENSITY | Cv= | Cs | CpCs | undefined | Cp(1-Cs)+CcCs | Cp+Cs |
| Av= | As | ApAs | Ap(1-As)+AcAs | Ap+As | ||
GL_RGB | Cv= | Cs | CpCs | Cs | Cp(1-Cs)+CcCs | Cp+Cs |
| (or 3) | Av= | Ap | Ap | Ap | Ap | Ap |
GL_RGBA | Cv= | Cs | CpCs | Cp(1-As)+CsAs | Cp(1-Cs)+CcCs | Cp+Cs |
| (or 4) | Av= | As | ApAs | Ap | ApAs | ApAs |
GL_TEXTURE_ENV_MODE, and params is
GL_COMBINE, the form of the texture function depends on the values
of GL_COMBINE_RGB and GL_COMBINE_ALPHA.
The following describes how the texture sources, as specified by
GL_SRC0_RGB, GL_SRC1_RGB, GL_SRC2_RGB, GL_SRC0_ALPHA,
GL_SRC1_ALPHA, and GL_SRC2_ALPHA, are combined to produce a
final texture color. In the following tables, GL_SRC0_c is
represented by Arg0, GL_SRC1_c is represented by Arg1, and
GL_SRC2_c is represented by Arg2.
GL_COMBINE_RGB accepts any of GL_REPLACE, GL_MODULATE,
GL_ADD, GL_ADD_SIGNED, GL_INTERPOLATE, GL_SUBTRACT,
GL_DOT3_RGB, or GL_DOT3_RGBA.
GL_COMBINE_RGB | Texture Function |
GL_REPLACE | Arg0 |
GL_MODULATE | Arg0×Arg1 |
GL_ADD | Arg0+Arg1 |
GL_ADD_SIGNED | Arg0+Arg1-0.5 |
GL_INTERPOLATE | Arg0×Arg2+Arg1×(1-Arg2) |
GL_SUBTRACT | Arg0-Arg1 |
GL_DOT3_RGB or GL_DOT3_RGBA | 4×(((Arg0r-0.5)×(Arg1r-0.5))+((Arg0g-0.5)×(Arg1g-0.5))+((Arg0b-0.5)×(Arg1b-0.5))) |
GL_DOT3_RGB and GL_DOT3_RGBA are placed into
each of the 3 (RGB) or 4 (RGBA) components on output.
Likewise, GL_COMBINE_ALPHA accepts any of GL_REPLACE,
GL_MODULATE, GL_ADD, GL_ADD_SIGNED, GL_INTERPOLATE, or
GL_SUBTRACT. The following table describes how alpha values are
combined:
GL_COMBINE_ALPHA | Texture Function |
GL_REPLACE | Arg0 |
GL_MODULATE | Arg0×Arg1 |
GL_ADD | Arg0+Arg1 |
GL_ADD_SIGNED | Arg0+Arg1-0.5 |
GL_INTERPOLATE | Arg0×Arg2+Arg1×(1-Arg2) |
GL_SUBTRACT | Arg0-Arg1 |
The following table describes the values assigned to Arg0, Arg1, and Arg2 based upon the RGB sources and operands:
| GL_SRCn_RGB | GL_OPERANDn_RGB | Argument Value |
GL_TEXTURE | GL_SRC_COLOR | Cs |
GL_ONE_MINUS_SRC_COLOR | 1-Cs | |
GL_SRC_ALPHA | As | |
GL_ONE_MINUS_SRC_ALPHA | 1-As | |
| GL_TEXTUREn | GL_SRC_COLOR | Cs |
GL_ONE_MINUS_SRC_COLOR | 1-Cs | |
GL_SRC_ALPHA | As | |
GL_ONE_MINUS_SRC_ALPHA | 1-As | |
GL_CONSTANT | GL_SRC_COLOR | Cc |
GL_ONE_MINUS_SRC_COLOR | 1-Cc | |
GL_SRC_ALPHA | Ac | |
GL_ONE_MINUS_SRC_ALPHA | 1-Ac | |
GL_PRIMARY_COLOR | GL_SRC_COLOR | Cf |
GL_ONE_MINUS_SRC_COLOR | 1-Cf | |
GL_SRC_ALPHA | Af | |
GL_ONE_MINUS_SRC_ALPHA | 1-Af | |
GL_PREVIOUS | GL_SRC_COLOR | Cp |
GL_ONE_MINUS_SRC_COLOR | 1-Cp | |
GL_SRC_ALPHA | Ap | |
GL_ONE_MINUS_SRC_ALPHA | 1-Ap |
The follow table describes the values assigned to Arg0, Arg1, and Arg2 based upon the alpha sources and operands:
| GL_SRCn_ALPHA | GL_OPERANDn_ALPHA | Argument Value |
GL_TEXTURE | GL_SRC_ALPHA | As |
GL_ONE_MINUS_SRC_ALPHA | 1-As | |
| GL_TEXTUREn | GL_SRC_ALPHA | As |
GL_ONE_MINUS_SRC_ALPHA | 1-As | |
GL_CONSTANT | GL_SRC_ALPHA | Ac |
GL_ONE_MINUS_SRC_ALPHA | 1-Ac | |
GL_PRIMARY_COLOR | GL_SRC_ALPHA | Af |
GL_ONE_MINUS_SRC_ALPHA | 1-Af | |
GL_PREVIOUS | GL_SRC_ALPHA | Ap |
GL_ONE_MINUS_SRC_ALPHA | 1-Ap |
GL_RGB_SCALE and GL_ALPHA_SCALE,
respectively, and clamped to the range [0, 1].
If pname is GL_TEXTURE_ENV_COLOR, params is an array that
holds an RGBA color consisting of four values. Integer color
components are interpreted linearly such that the most positive
integer maps to 1.0, and the most negative integer maps to -1.0. The
values are clamped to the range [0,1] when they are specified.
Cc takes these four values.
If pname is GL_TEXTURE_LOD_BIAS, the value specified is added
to the texture level-of-detail parameter, that selects which mipmap,
or mipmaps depending upon the selected GL_TEXTURE_MIN_FILTER, will
be sampled.
GL_TEXTURE_ENV_MODE defaults to GL_MODULATE and
GL_TEXTURE_ENV_COLOR defaults to (0, 0, 0, 0).
If target is GL_POINT_SPRITE and pname is
GL_COORD_REPLACE, the boolean value specified is used to either
enable or disable point sprite texture coordinate replacement. The
default value is GL_FALSE.
targetSpecifies a texture environment. May be GL_TEXTURE_ENV,
GL_TEXTURE_FILTER_CONTROL or GL_POINT_SPRITE.
pnameSpecifies the symbolic name of a single-valued texture environment
parameter. May be either GL_TEXTURE_ENV_MODE,
GL_TEXTURE_LOD_BIAS, GL_COMBINE_RGB, GL_COMBINE_ALPHA,
GL_SRC0_RGB, GL_SRC1_RGB, GL_SRC2_RGB, GL_SRC0_ALPHA,
GL_SRC1_ALPHA, GL_SRC2_ALPHA, GL_OPERAND0_RGB,
GL_OPERAND1_RGB, GL_OPERAND2_RGB, GL_OPERAND0_ALPHA,
GL_OPERAND1_ALPHA, GL_OPERAND2_ALPHA, GL_RGB_SCALE,
GL_ALPHA_SCALE, or GL_COORD_REPLACE.
paramSpecifies a single symbolic constant, one of GL_ADD,
GL_ADD_SIGNED, GL_INTERPOLATE, GL_MODULATE, GL_DECAL,
GL_BLEND, GL_REPLACE, GL_SUBTRACT, GL_COMBINE,
GL_TEXTURE, GL_CONSTANT, GL_PRIMARY_COLOR, GL_PREVIOUS,
GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA,
GL_ONE_MINUS_SRC_ALPHA, a single boolean value for the point sprite
texture coordinate replacement, a single floating-point value for the
texture level-of-detail bias, or 1.0, 2.0, or 4.0 when specifying the
GL_RGB_SCALE or GL_ALPHA_SCALE.
targetSpecifies a texture environment. May be either GL_TEXTURE_ENV, or
GL_TEXTURE_FILTER_CONTROL.
pnameSpecifies the symbolic name of a texture environment parameter.
Accepted values are GL_TEXTURE_ENV_MODE, GL_TEXTURE_ENV_COLOR,
or GL_TEXTURE_LOD_BIAS.
paramsSpecifies a pointer to a parameter array that contains either a single symbolic constant, single floating-point number, or an RGBA color.
GL_INVALID_ENUM is generated when target or pname is not
one of the accepted defined values, or when params should have a
defined constant value (based on the value of pname) and does
not.
GL_INVALID_VALUE is generated if the params value for
GL_RGB_SCALE or GL_ALPHA_SCALE are not one of 1.0, 2.0, or 4.0.
GL_INVALID_OPERATION is generated if glTexEnv is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GL_REPLACE may only be used if the GL version is 1.1 or greater.
GL_TEXTURE_FILTER_CONTROL and GL_TEXTURE_LOD_BIAS may only be
used if the GL version is 1.4 or greater.
GL_COMBINE mode and its associated constants may only be used if
the GL version is 1.3 or greater.
GL_TEXTUREn may only be used if the GL version is 1.4 or greater.
Internal formats other than 1, 2, 3, or 4 may only be used if the GL version is 1.1 or greater.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glTexEnv controls
the texture environment for the current active texture unit, selected
by glActiveTexture.
GL_POINT_SPRITE and GL_COORD_REPLACE are available only if the
GL version is 2.0 or greater.
glActiveTexture, glCopyPixels, glCopyTexImage1D,
glCopyTexImage2D, glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glTexImage1D, glTexImage2D,
glTexImage3D, glTexParameter, glTexSubImage1D,
glTexSubImage2D, glTexSubImage3D
void glTexGen(int coord, int pname, float|int|array(float|int) param)
glTexGen selects a texture-coordinate generation function or
supplies coefficients for one of the functions. coord names one
of the (s, t, r, q) texture coordinates; it must
be one of the symbols GL_S, GL_T, GL_R, or GL_Q.
pname must be one of three symbolic constants:
GL_TEXTURE_GEN_MODE, GL_OBJECT_PLANE, or GL_EYE_PLANE. If
pname is GL_TEXTURE_GEN_MODE, then params chooses a mode,
one of GL_OBJECT_LINEAR, GL_EYE_LINEAR, GL_SPHERE_MAP,
GL_NORMAL_MAP, or GL_REFLECTION_MAP. If pname is either
GL_OBJECT_PLANE or GL_EYE_PLANE, params contains
coefficients for the corresponding texture generation function.
If the texture generation function is GL_OBJECT_LINEAR, the
function
g=p1×xo+p2×yo+p3×zo+p4×wo
is used, where g is the value computed for the coordinate named
in coord, p1, p2, p3, and
p4 are the four values supplied in params, and
xo, yo, zo, and
wo are the object coordinates of the vertex. This
function can be used, for example, to texture-map terrain using sea
level as a reference plane (defined by p1, p2,
p3, and p4). The altitude of a terrain vertex
is computed by the GL_OBJECT_LINEAR coordinate generation function
as its distance from sea level; that altitude can then be used to
index the texture image to map white snow onto peaks and green grass
onto foothills.
If the texture generation function is GL_EYE_LINEAR, the function
g=p1″×xe+p2″×ye+p3″×ze+p4″×we
is used, where
(p1″p2″p3″p4″)=(p1p2p3p4)M-1
and xe, ye, ze, and
we are the eye coordinates of the vertex,
p1, p2, p3, and p4 are
the values supplied in params, and M is the modelview matrix
when glTexGen is invoked. If M is poorly conditioned or
singular, texture coordinates generated by the resulting function may
be inaccurate or undefined.
Note that the values in params define a reference plane in eye coordinates. The modelview matrix that is applied to them may not be the same one in effect when the polygon vertices are transformed. This function establishes a field of texture coordinates that can produce dynamic contour lines on moving objects.
If the texture generation function is GL_SPHERE_MAP and coord
is either GL_S or GL_T, s and t texture coordinates
are generated as follows. Let u be the unit vector pointing from
the origin to the polygon vertex (in eye coordinates). Let n sup
prime be the current normal, after transformation to eye coordinates.
Let
f=(fxfyfz)T be the reflection vector such that
f=u-2n″n″Tu
Finally, let m=2√(fx2+fy2+(fz+1)2) . Then the values assigned to the s and t texture coordinates are
s=fx/m+1/2
t=fy/m+1/2
To enable or disable a texture-coordinate generation function, call
glEnable or glDisable with one of the symbolic
texture-coordinate names (GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T,
GL_TEXTURE_GEN_R, or GL_TEXTURE_GEN_Q) as the argument. When
enabled, the specified texture coordinate is computed according to the
generating function associated with that coordinate. When disabled,
subsequent vertices take the specified texture coordinate from the
current set of texture coordinates. Initially, all texture generation
functions are set to GL_EYE_LINEAR and are disabled. Both s
plane equations are (1, 0, 0, 0), both t plane equations are (0,
1, 0, 0), and all r and q plane equations are (0, 0, 0, 0).
When the ARB_multitexture extension is supported, glTexGen
sets the texture generation parameters for the currently active
texture unit, selected with glActiveTexture.
coordSpecifies a texture coordinate. Must be one of GL_S, GL_T,
GL_R, or GL_Q.
pnameSpecifies the symbolic name of the texture-coordinate generation
function. Must be GL_TEXTURE_GEN_MODE.
paramSpecifies a single-valued texture generation parameter, one of
GL_OBJECT_LINEAR, GL_EYE_LINEAR, GL_SPHERE_MAP,
GL_NORMAL_MAP, or GL_REFLECTION_MAP.
coordSpecifies a texture coordinate. Must be one of GL_S, GL_T,
GL_R, or GL_Q.
pnameSpecifies the symbolic name of the texture-coordinate generation
function or function parameters. Must be GL_TEXTURE_GEN_MODE,
GL_OBJECT_PLANE, or GL_EYE_PLANE.
paramsSpecifies an array of texture generation parameters. If pname is
GL_TEXTURE_GEN_MODE, then the array must contain a single symbolic
constant, one of GL_OBJECT_LINEAR, GL_EYE_LINEAR,
GL_SPHERE_MAP, GL_NORMAL_MAP, or GL_REFLECTION_MAP.
Otherwise, params holds the coefficients for the
texture-coordinate generation function specified by pname.
GL_INVALID_ENUM is generated when coord or pname is not
an accepted defined value, or when pname is
GL_TEXTURE_GEN_MODE and params is not an accepted defined
value.
GL_INVALID_ENUM is generated when pname is
GL_TEXTURE_GEN_MODE, params is GL_SPHERE_MAP, and
coord is either GL_R or GL_Q.
GL_INVALID_OPERATION is generated if glTexGen is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glActiveTexture, glCopyPixels, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glTexEnv, glTexImage1D, glTexImage2D,
glTexImage3D, glTexParameter, glTexSubImage1D,
glTexSubImage2D, glTexSubImage3D
void glTexImage1D(int target, int level, int internalFormat, object|mapping(string:object) width, int border, object|mapping(string:object) format, object|mapping(string:object) type, object|mapping(string:object) data)
Texturing maps a portion of a specified texture image onto each
graphical primitive for which texturing is enabled. To enable and
disable one-dimensional texturing, call glEnable and glDisable
with argument GL_TEXTURE_1D.
Texture images are defined with glTexImage1D. The arguments
describe the parameters of the texture image, such as width, width of
the border, level-of-detail number (see glTexParameter), and the
internal resolution and format used to store the image. The last three
arguments describe how the image is represented in memory; they are
identical to the pixel formats used for glDrawPixels.
If target is GL_PROXY_TEXTURE_1D, no data is read from
data, but all of the texture image state is recalculated, checked
for consistency, and checked against the implementation's
capabilities. If the implementation cannot handle a texture of the
requested texture size, it sets all of the image state to 0, but does
not generate an error (see glGetError). To query for an entire
mipmap array, use an image array level greater than or equal to 1.
If target is GL_TEXTURE_1D, data is read from data as a
sequence of signed or unsigned bytes, shorts, or longs, or
single-precision floating-point values, depending on type. These
values are grouped into sets of one, two, three, or four values,
depending on format, to form elements. If type is
GL_BITMAP, the data is considered as a string of unsigned bytes
(and format must be GL_COLOR_INDEX). Each data byte is treated
as eight 1-bit elements, with bit ordering determined by
GL_UNPACK_LSB_FIRST (see glPixelStore).
If a non-zero named buffer object is bound to the
GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer) while a texture
image is specified, data is treated as a byte offset into the
buffer object's data store.
The first element corresponds to the left end of the texture array. Subsequent elements progress left-to-right through the remaining texels in the texture array. The final element corresponds to the right end of the texture array.
format determines the composition of each element in data. It can assume one of these symbolic values:
GL_COLOR_INDEX | Each element is a single value, a color index. The GL converts
it to fixed point (with an unspecified number of zero bits to the
right of the binary point), shifted left or right depending on the
value and sign of |
GL_RED | Each element is a single red component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for green and blue, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_GREEN | Each element is a single green component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red and blue, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_BLUE | Each element is a single blue component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red and green, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_ALPHA | Each element is a single alpha component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red, green, and blue. Each component is then multiplied by the
signed scale factor GL_c_SCALE, added to the signed
bias GL_c_BIAS, and clamped to the range [0,1] (see
|
GL_INTENSITY | Each element is a single intensity value. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the intensity value three times for red, green, blue, and alpha. Each
component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and
clamped to the range [0,1] (see |
GL_RGB | |
GL_BGR | Each element is an RGB triple. The GL converts it to floating
point and assembles it into an RGBA element by attaching 1 for alpha.
Each component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS,
and clamped to the range [0,1] (see |
GL_RGBA | |
GL_BGRA | Each element contains all four components. Each component is
multiplied by the signed scale factor GL_c_SCALE,
added to the signed bias GL_c_BIAS, and clamped to the
range [0,1] (see |
GL_LUMINANCE | Each element is a single luminance value. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the luminance value three times for red, green, and blue and attaching
1 for alpha. Each component is then multiplied by the signed scale
factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and clamped to the range [0,1] (see |
GL_LUMINANCE_ALPHA | Each element is a luminance/alpha pair. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the luminance value three times for red, green, and blue. Each
component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and
clamped to the range [0,1] (see |
GL_DEPTH_COMPONENT | Each element is a single depth value. The GL converts it to
floating point, multiplies by the signed scale factor |
glDrawPixels reference page for a
description of the acceptable values for the type parameter.
If an application wants to store the texture at a certain resolution
or in a certain format, it can request the resolution and format with
internalFormat. The GL will choose an internal representation
that closely approximates that requested by internalFormat, but
it may not match exactly. (The representations specified by
GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, and GL_RGBA must
match exactly. The numeric values 1, 2, 3, and 4 may also be used to
specify the above representations.)
If the internalFormat parameter is one of the generic compressed
formats, GL_COMPRESSED_ALPHA, GL_COMPRESSED_INTENSITY,
GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,
GL_COMPRESSED_RGB, or GL_COMPRESSED_RGBA, the GL will replace
the internal format with the symbolic constant for a specific internal
format and compress the texture before storage. If no corresponding
internal format is available, or the GL can not compress that image
for any reason, the internal format is instead replaced with a
corresponding base internal format.
If the internalFormat parameter is GL_SRGB, GL_SRGB8,
GL_SRGB_ALPHA, GL_SRGB8_ALPHA8, GL_SLUMINANCE,
GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, or
GL_SLUMINANCE8_ALPHA8, the texture is treated as if the red, green,
blue, or luminance components are encoded in the sRGB color space. Any
alpha component is left unchanged. The conversion from the sRGB
encoded component cs to a linear component
cl is:
cl={
| cs/12.92 | if cs≤0.04045 |
| (cs+0.055/1.055)2.4 | if cs>0.04045 |
Assume cs is the sRGB component in the range [0,1].
Use the GL_PROXY_TEXTURE_1D target to try out a resolution and
format. The implementation will update and recompute its best match
for the requested storage resolution and format. To then query this
state, call glGetTexLevelParameter. If the texture cannot be
accommodated, texture state is set to 0.
A one-component texture image uses only the red component of the RGBA color from data. A two-component image uses the R and A values. A three-component image uses the R, G, and B values. A four-component image uses all of the RGBA components.
Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA
textures during texture filtering and application. Image-based
shadowing can be enabled by comparing texture r coordinates to depth
texture values to generate a boolean result. See glTexParameter for
details on texture comparison.
targetSpecifies the target texture. Must be GL_TEXTURE_1D or
GL_PROXY_TEXTURE_1D.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
internalFormatSpecifies the number of color components in the texture. Must be 1, 2,
3, or 4, or one of the following symbolic constants: GL_ALPHA,
GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16,
GL_COMPRESSED_ALPHA, GL_COMPRESSED_LUMINANCE,
GL_COMPRESSED_LUMINANCE_ALPHA, GL_COMPRESSED_INTENSITY,
GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT,
GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24,
GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4,
GL_LUMINANCE8, GL_LUMINANCE12, GL_LUMINANCE16,
GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4,
GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8,
GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12,
GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4,
GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16,
GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8,
GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2,
GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12,
GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8,
GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB,
GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8.
widthSpecifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be 2n+2(border) for some integer n. All implementations support texture images that are at least 64 texels wide. The height of the 1D texture image is 1.
borderSpecifies the width of the border. Must be either 0 or 1.
formatSpecifies the format of the pixel data. The following symbolic values
are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
typeSpecifies the data type of the pixel data. The following symbolic
values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP,
GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT,
GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
dataSpecifies a pointer to the image data in memory.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_1D
or GL_PROXY_TEXTURE_1D.
GL_INVALID_ENUM is generated if format is not an accepted
format constant. Format constants other than GL_STENCIL_INDEX are
accepted.
GL_INVALID_ENUM is generated if type is not a type constant.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not GL_COLOR_INDEX.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2(max)
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if internalFormat is not 1, 2,
3, 4, or one of the accepted resolution and format symbolic constants.
GL_INVALID_VALUE is generated if width is less than 0 or
greater than 2 + GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if non-power-of-two textures are not
supported and the width cannot be represented as
2n+2(border)
for some integer value of n.
GL_INVALID_VALUE is generated if border is not 0 or 1.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
GL_INVALID_OPERATION is generated if format is
GL_DEPTH_COMPONENT and internalFormat is not
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32.
GL_INVALID_OPERATION is generated if internalFormat is
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32, and format
is not GL_DEPTH_COMPONENT.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
unpacked from the buffer object such that the memory reads required
would exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glTexImage1D is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Texturing has no effect in color index mode.
If the ARB_imaging extension is supported, RGBA elements may also be processed by the imaging pipeline. The following stages may be applied to an RGBA color before color component clamping to the range [0, 1]:
| 1. Color component replacement by the color table specified for |
|
| 2. One-dimensional convolution filtering, if enabled. See |
If a convolution filter
changes the width of the texture (by processing with a |
| 3. RGBA components may be multiplied by GL_POST_CONVOLUTION_c_SCALE, | and added to GL_POST_CONVOLUTION_c_BIAS, if
enabled. See |
| 4. Color component replacement by the color table specified for |
|
| 5. Transformation by the color matrix. | See |
| 6. RGBA components may be multiplied by GL_POST_COLOR_MATRIX_c_SCALE, | and added to GL_POST_COLOR_MATRIX_c_BIAS, if
enabled. See |
| 7. Color component replacement by the color table specified for |
|
glDrawPixels command, except that
GL_STENCIL_INDEX cannot be used. glPixelStore and
glPixelTransfer modes affect texture images in exactly the way they
affect glDrawPixels.
GL_PROXY_TEXTURE_1D may be used only if the GL version is 1.1 or
greater.
Internal formats other than 1, 2, 3, or 4 may be used only if the GL version is 1.1 or greater.
In GL version 1.1 or greater, data may be a null pointer. In this case texture memory is allocated to accommodate a texture of width width. You can then download subtextures to initialize the texture memory. The image is undefined if the program tries to apply an uninitialized portion of the texture image to a primitive.
Formats GL_BGR, and GL_BGRA and types GL_UNSIGNED_BYTE_3_3_2,
GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
GL_UNSIGNED_INT_2_10_10_10_REV are available only if the GL version
is 1.2 or greater.
When the ARB_multitexture extension is supported, or the GL
version is 1.3 or greater, glTexImage1D specifies the
one-dimensional texture for the current texture unit, specified with
glActiveTexture.
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, and GL_DEPTH_COMPONENT32 are available
only if the GL version is 1.4 or greater.
Non-power-of-two textures are supported if the GL version is 2.0 or
greater, or if the implementation exports the
GL_ARB_texture_non_power_of_two extension.
The GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, GL_SRGB8_ALPHA8,
GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, and
GL_SLUMINANCE8_ALPHA8 internal formats are only available if the GL
version is 2.1 or greater.
glActiveTexture, glColorTable, glCompressedTexImage1D,
glCompressedTexSubImage1D, glConvolutionFilter1D,
glCopyPixels, glCopyTexImage1D, glCopyTexSubImage1D,
glDrawPixels, glGetCompressedTexImage, glMatrixMode,
glPixelStore, glPixelTransfer, glTexEnv, glTexGen,
glTexImage2D, glTexImage3D, glTexSubImage1D,
glTexSubImage2D, glTexSubImage3D, glTexParameter
void glTexImage2D(int target, int level, int internalFormat, object|mapping(string:object) width, object|mapping(string:object) height, int border, object|mapping(string:object) format, object|mapping(string:object) type, object|mapping(string:object) data)
Texturing maps a portion of a specified texture image onto each
graphical primitive for which texturing is enabled. To enable and
disable two-dimensional texturing, call glEnable and glDisable
with argument GL_TEXTURE_2D. To enable and disable texturing using
cube-mapped texture, call glEnable and glDisable with argument
GL_TEXTURE_CUBE_MAP.
To define texture images, call glTexImage2D. The arguments describe
the parameters of the texture image, such as height, width, width of
the border, level-of-detail number (see glTexParameter), and number
of color components provided. The last three arguments describe how
the image is represented in memory; they are identical to the pixel
formats used for glDrawPixels.
If target is GL_PROXY_TEXTURE_2D or
GL_PROXY_TEXTURE_CUBE_MAP, no data is read from data, but all
of the texture image state is recalculated, checked for consistency,
and checked against the implementation's capabilities. If the
implementation cannot handle a texture of the requested texture size,
it sets all of the image state to 0, but does not generate an error
(see glGetError). To query for an entire mipmap array, use an image
array level greater than or equal to 1.
If target is GL_TEXTURE_2D, or one of the
GL_TEXTURE_CUBE_MAP targets, data is read from data as a
sequence of signed or unsigned bytes, shorts, or longs, or
single-precision floating-point values, depending on type. These
values are grouped into sets of one, two, three, or four values,
depending on format, to form elements. If type is
GL_BITMAP, the data is considered as a string of unsigned bytes
(and format must be GL_COLOR_INDEX). Each data byte is treated
as eight 1-bit elements, with bit ordering determined by
GL_UNPACK_LSB_FIRST (see glPixelStore).
If a non-zero named buffer object is bound to the
GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer) while a texture
image is specified, data is treated as a byte offset into the
buffer object's data store.
The first element corresponds to the lower left corner of the texture image. Subsequent elements progress left-to-right through the remaining texels in the lowest row of the texture image, and then in successively higher rows of the texture image. The final element corresponds to the upper right corner of the texture image.
format determines the composition of each element in data. It can assume one of these symbolic values:
GL_COLOR_INDEX | Each element is a single value, a color index. The GL converts
it to fixed point (with an unspecified number of zero bits to the
right of the binary point), shifted left or right depending on the
value and sign of |
GL_RED | Each element is a single red component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for green and blue, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_GREEN | Each element is a single green component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red and blue, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_BLUE | Each element is a single blue component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red and green, and 1 for alpha. Each component is then multiplied
by the signed scale factor GL_c_SCALE, added to the
signed bias GL_c_BIAS, and clamped to the range [0,1]
(see |
GL_ALPHA | Each element is a single alpha component. The GL converts it to
floating point and assembles it into an RGBA element by attaching 0
for red, green, and blue. Each component is then multiplied by the
signed scale factor GL_c_SCALE, added to the signed
bias GL_c_BIAS, and clamped to the range [0,1] (see
|
GL_INTENSITY | Each element is a single intensity value. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the intensity value three times for red, green, blue, and alpha. Each
component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and
clamped to the range [0,1] (see |
GL_RGB | |
GL_BGR | Each element is an RGB triple. The GL converts it to floating
point and assembles it into an RGBA element by attaching 1 for alpha.
Each component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS,
and clamped to the range [0,1] (see |
GL_RGBA | |
GL_BGRA | Each element contains all four components. Each component is
multiplied by the signed scale factor GL_c_SCALE,
added to the signed bias GL_c_BIAS, and clamped to the
range [0,1] (see |
GL_LUMINANCE | Each element is a single luminance value. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the luminance value three times for red, green, and blue and attaching
1 for alpha. Each component is then multiplied by the signed scale
factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and clamped to the range [0,1] (see |
GL_LUMINANCE_ALPHA | Each element is a luminance/alpha pair. The GL converts it to
floating point, then assembles it into an RGBA element by replicating
the luminance value three times for red, green, and blue. Each
component is then multiplied by the signed scale factor GL_c_SCALE, added to the signed bias GL_c_BIAS, and
clamped to the range [0,1] (see |
GL_DEPTH_COMPONENT | Each element is a single depth value. The GL converts it to
floating point, multiplies by the signed scale factor |
glDrawPixels reference page for a
description of the acceptable values for the type parameter.
If an application wants to store the texture at a certain resolution
or in a certain format, it can request the resolution and format with
internalFormat. The GL will choose an internal representation
that closely approximates that requested by internalFormat, but
it may not match exactly. (The representations specified by
GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, and GL_RGBA must
match exactly. The numeric values 1, 2, 3, and 4 may also be used to
specify the above representations.)
If the internalFormat parameter is one of the generic compressed
formats, GL_COMPRESSED_ALPHA, GL_COMPRESSED_INTENSITY,
GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,
GL_COMPRESSED_RGB, or GL_COMPRESSED_RGBA, the GL will replace
the internal format with the symbolic constant for a specific internal
format and compress the texture before storage. If no corresponding
internal format is available, or the GL can not compress that image
for any reason, the internal format is instead replaced with a
corresponding base internal format.
If the internalFormat parameter is GL_SRGB, GL_SRGB8,
GL_SRGB_ALPHA, GL_SRGB8_ALPHA8, GL_SLUMINANCE,
GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, or
GL_SLUMINANCE8_ALPHA8, the texture is treated as if the red, green,
blue, or luminance components are encoded in the sRGB color space. Any
alpha component is left unchanged. The conversion from the sRGB
encoded component cs to a linear component
cl is:
cl={
| cs/12.92 | if cs≤0.04045 |
| (cs+0.055/1.055)2.4 | if cs>0.04045 |
Assume cs is the sRGB component in the range [0,1].
Use the GL_PROXY_TEXTURE_2D or GL_PROXY_TEXTURE_CUBE_MAP target
to try out a resolution and format. The implementation will update and
recompute its best match for the requested storage resolution and
format. To then query this state, call glGetTexLevelParameter. If
the texture cannot be accommodated, texture state is set to 0.
A one-component texture image uses only the red component of the RGBA color extracted from data. A two-component image uses the R and A values. A three-component image uses the R, G, and B values. A four-component image uses all of the RGBA components.
Depth textures can be treated as LUMINANCE, INTENSITY or ALPHA
textures during texture filtering and application. Image-based
shadowing can be enabled by comparing texture r coordinates to depth
texture values to generate a boolean result. See glTexParameter for
details on texture comparison.
targetSpecifies the target texture. Must be GL_TEXTURE_2D,
GL_PROXY_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_PROXY_TEXTURE_CUBE_MAP.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
internalFormatSpecifies the number of color components in the texture. Must be 1, 2,
3, or 4, or one of the following symbolic constants: GL_ALPHA,
GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16,
GL_COMPRESSED_ALPHA, GL_COMPRESSED_LUMINANCE,
GL_COMPRESSED_LUMINANCE_ALPHA, GL_COMPRESSED_INTENSITY,
GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT,
GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24,
GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4,
GL_LUMINANCE8, GL_LUMINANCE12, GL_LUMINANCE16,
GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4,
GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8,
GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12,
GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4,
GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16,
GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8,
GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2,
GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12,
GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8,
GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB,
GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8.
widthSpecifies the width of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be 2n+2(border) for some integer n. All implementations support texture images that are at least 64 texels wide.
heightSpecifies the height of the texture image including the border if any. If the GL version does not support non-power-of-two sizes, this value must be 2m+2(border) for some integer m. All implementations support texture images that are at least 64 texels high.
borderSpecifies the width of the border. Must be either 0 or 1.
formatSpecifies the format of the pixel data. The following symbolic values
are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
typeSpecifies the data type of the pixel data. The following symbolic
values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP,
GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT,
GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
dataSpecifies a pointer to the image data in memory.
GL_INVALID_ENUM is generated if target is not
GL_TEXTURE_2D, GL_PROXY_TEXTURE_2D,
GL_PROXY_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if target is one of the six cube
map 2D image targets and the width and height parameters are not
equal.
GL_INVALID_ENUM is generated if type is not a type constant.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not GL_COLOR_INDEX.
GL_INVALID_VALUE is generated if width or height is less
than 0 or greater than 2 + GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2(max)
, where max is the returned value of GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if internalFormat is not 1, 2,
3, 4, or one of the accepted resolution and format symbolic constants.
GL_INVALID_VALUE is generated if width or height is less
than 0 or greater than 2 + GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if non-power-of-two textures are not
supported and the width or height cannot be represented as
2k+2(border)
for some integer value of k.
GL_INVALID_VALUE is generated if border is not 0 or 1.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
GL_INVALID_OPERATION is generated if target is not
GL_TEXTURE_2D or GL_PROXY_TEXTURE_2D and internalFormat is
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32.
GL_INVALID_OPERATION is generated if format is
GL_DEPTH_COMPONENT and internalFormat is not
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32.
GL_INVALID_OPERATION is generated if internalFormat is
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, or GL_DEPTH_COMPONENT32, and format
is not GL_DEPTH_COMPONENT.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
unpacked from the buffer object such that the memory reads required
would exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glTexImage2D is executed
between the execution of glBegin and the corresponding execution of
glEnd.
Texturing has no effect in color index mode.
If the ARB_imaging extension is supported, RGBA elements may also be processed by the imaging pipeline. The following stages may be applied to an RGBA color before color component clamping to the range [0, 1]:
| 1. Color component replacement by the color table specified for |
|
| 2. Two-dimensional Convolution filtering, if enabled. | See If a convolution
filter changes the width of the texture (by processing with a
|
| 3. RGBA components may be multiplied by GL_POST_CONVOLUTION_c_SCALE, | and added to GL_POST_CONVOLUTION_c_BIAS, if
enabled. See |
| 4. Color component replacement by the color table specified for |
|
| 5. Transformation by the color matrix. | See |
| 6. RGBA components may be multiplied by GL_POST_COLOR_MATRIX_c_SCALE, | and added to GL_POST_COLOR_MATRIX_c_BIAS, if
enabled. See |
| 7. Color component replacement by the color table specified for |
|
glDrawPixels command, except that
GL_STENCIL_INDEX cannot be used. glPixelStore and
glPixelTransfer modes affect texture images in exactly the way they
affect glDrawPixels.
glTexImage2D and GL_PROXY_TEXTURE_2D are available only if the
GL version is 1.1 or greater.
Internal formats other than 1, 2, 3, or 4 may be used only if the GL version is 1.1 or greater.
In GL version 1.1 or greater, data may be a null pointer. In this case, texture memory is allocated to accommodate a texture of width width and height height. You can then download subtextures to initialize this texture memory. The image is undefined if the user tries to apply an uninitialized portion of the texture image to a primitive.
Formats GL_BGR, and GL_BGRA and types GL_UNSIGNED_BYTE_3_3_2,
GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
GL_UNSIGNED_INT_2_10_10_10_REV are available only if the GL version
is 1.2 or greater.
When the ARB_multitexture extension is supported or the GL
version is 1.3 or greater, glTexImage2D specifies the
two-dimensional texture for the current texture unit, specified with
glActiveTexture.
GL_TEXTURE_CUBE_MAP and GL_PROXY_TEXTURE_CUBE_MAP are available
only if the GL version is 1.3 or greater.
GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,
GL_DEPTH_COMPONENT24, and GL_DEPTH_COMPONENT32 are available
only if the GL version is 1.4 or greater.
Non-power-of-two textures are supported if the GL version is 2.0 or
greater, or if the implementation exports the
GL_ARB_texture_non_power_of_two extension.
The GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, GL_SRGB8_ALPHA8,
GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, and
GL_SLUMINANCE8_ALPHA8 internal formats are only available if the GL
version is 2.1 or greater.
glActiveTexture, glColorTable, glConvolutionFilter2D,
glCopyPixels, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glDrawPixels, glMatrixMode,
glPixelStore, glPixelTransfer, glSeparableFilter2D,
glTexEnv, glTexGen, glTexImage1D, glTexImage3D,
glTexSubImage1D, glTexSubImage2D, glTexSubImage3D,
glTexParameter
void glTexParameter(int target, int pname, float|int|array(float|int) param)
Texture mapping is a technique that applies an image onto an object's surface as if the image were a decal or cellophane shrink-wrap. The image is created in texture space, with an (s, t) coordinate system. A texture is a one- or two-dimensional image and a set of parameters that determine how samples are derived from the image.
glTexParameter assigns the value or values in params to the
texture parameter specified as pname. target defines the
target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D, or
GL_TEXTURE_3D. The following symbols are accepted in pname:
GL_TEXTURE_MIN_FILTER | The texture minifying function is used whenever the pixel being textured maps to an area greater than one texture element. There are six defined minifying functions. Two of them use the nearest one or nearest four texture elements to compute the texture value. The other four use mipmaps. A mipmap is an ordered set of arrays
representing the same image at progressively lower resolutions. If the
texture has dimensions 2n×2m,
there are max(n, m)+1 mipmaps. The first mipmap is the
original texture, with dimensions 2n×2m. Each subsequent mipmap has dimensions 2k-1×2l-1, where 2k×2l are the dimensions of the previous mipmap,
until either k=0 or l=0. At that point, subsequent
mipmaps have dimension 1×2l-1 or 2k-1×1 until the final mipmap, which has dimension 1×1.
To define the mipmaps, call params supplies a function for minifying the texture as one of the following:
As more texture elements are sampled in the
minification process, fewer aliasing artifacts will be apparent. While
the | ||||||||||||
GL_TEXTURE_MAG_FILTER | The texture magnification function is used when the pixel being
textured maps to an area less than or equal to one texture element. It
sets the texture magnification function to either
|
GL_TEXTURE_MIN_LOD | Sets the minimum level-of-detail parameter. This floating-point value limits the selection of highest resolution mipmap (lowest mipmap level). The initial value is -1000. |
GL_TEXTURE_MAX_LOD | Sets the maximum level-of-detail parameter. This floating-point value limits the selection of the lowest resolution mipmap (highest mipmap level). The initial value is 1000. |
GL_TEXTURE_BASE_LEVEL | Specifies the index of the lowest defined mipmap level. This is an integer value. The initial value is 0. |
GL_TEXTURE_MAX_LEVEL | Sets the index of the highest defined mipmap level. This is an integer value. The initial value is 1000. |
GL_TEXTURE_WRAP_S | Sets the wrap parameter for texture coordinate s to
either |
GL_TEXTURE_WRAP_T | Sets the wrap parameter for texture coordinate t to
either | ||||||||||||||||||||||||||||||||||||||||||
GL_TEXTURE_WRAP_R | Sets the wrap parameter for texture coordinate r to
either | ||||||||||||||||||||||||||||||||||||||||||
GL_TEXTURE_BORDER_COLOR | Sets a border color. params contains four values that comprise the RGBA color of the texture border. Integer color components are interpreted linearly such that the most positive integer maps to 1.0, and the most negative integer maps to -1.0. The values are clamped to the range [0,1] when they are specified. Initially, the border color is (0, 0, 0, 0). | ||||||||||||||||||||||||||||||||||||||||||
GL_TEXTURE_PRIORITY | Specifies the texture residence priority of the currently bound
texture. Permissible values are in the range [0, 1]. See | ||||||||||||||||||||||||||||||||||||||||||
GL_TEXTURE_COMPARE_MODE | Specifies the texture comparison mode for currently bound depth
textures. That is, a texture whose internal format is GL_DEPTH_COMPONENT_*; see
| ||||||||||||||||||||||||||||||||||||||||||
GL_TEXTURE_COMPARE_FUNC | Specifies the comparison operator used when
GL_DEPTH_TEXTURE_MODE.) | ||||||||||||||||||||||||||||||||||||||||||
GL_DEPTH_TEXTURE_MODE | Specifies a single symbolic constant indicating how depth values
should be treated during filtering and texture application. Accepted
values are | ||||||||||||||||||||||||||||||||||||||||||
GL_GENERATE_MIPMAP | Specifies a boolean value that indicates if all levels of a
mipmap array should be automatically updated when any modification to
the base level mipmap is done. The initial value is |
targetSpecifies the target texture, which must be either GL_TEXTURE_1D,
GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP.
pnameSpecifies the symbolic name of a single-valued texture parameter.
pname can be one of the following: GL_TEXTURE_MIN_FILTER,
GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD,
GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL,
GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,
GL_TEXTURE_WRAP_R, GL_TEXTURE_PRIORITY,
GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC,
GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP.
paramSpecifies the value of pname.
targetSpecifies the target texture, which must be either GL_TEXTURE_1D,
GL_TEXTURE_2D or GL_TEXTURE_3D.
pnameSpecifies the symbolic name of a texture parameter. pname can be
one of the following: GL_TEXTURE_MIN_FILTER,
GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD,
GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL,
GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,
GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR,
GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE,
GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE, or
GL_GENERATE_MIPMAP.
paramsSpecifies an array where the value or values of pname are stored.
GL_INVALID_ENUM is generated if target or pname is not
one of the accepted defined values.
GL_INVALID_ENUM is generated if params should have a defined
constant value (based on the value of pname) and does not.
GL_INVALID_OPERATION is generated if glTexParameter is executed
between the execution of glBegin and the corresponding execution of
glEnd.
GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD,
GL_CLAMP_TO_EDGE, GL_TEXTURE_BASE_LEVEL, and
GL_TEXTURE_MAX_LEVEL are available only if the GL version is 1.2 or
greater.
GL_CLAMP_TO_BORDER is available only if the GL version is 1.3 or
greater.
GL_MIRRORED_REPEAT, GL_TEXTURE_COMPARE_MODE,
GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE, and
GL_GENERATE_MIPMAP are available only if the GL version is 1.4 or
greater.
GL_TEXTURE_COMPARE_FUNC allows the following additional comparison
modes only if the GL version is 1.5 or greater: GL_LESS,
GL_GREATER, GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS, and
GL_NEVER.
Suppose that a program has enabled texturing (by calling glEnable
with argument GL_TEXTURE_1D, GL_TEXTURE_2D, or GL_TEXTURE_3D)
and has set GL_TEXTURE_MIN_FILTER to one of the functions that
requires a mipmap. If either the dimensions of the texture images
currently defined (with previous calls to glTexImage1D,
glTexImage2D, glTexImage3D, glCopyTexImage1D, or
glCopyTexImage2D) do not follow the proper sequence for mipmaps
(described above), or there are fewer texture images defined than are
needed, or the set of texture images have differing numbers of texture
components, then it is as if texture mapping were disabled.
Linear filtering accesses the four nearest texture elements only in 2D textures. In 1D textures, linear filtering accesses the two nearest texture elements.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glTexParameter
specifies the texture parameters for the active texture unit,
specified by calling glActiveTexture.
glActiveTexture, glBindTexture, glCopyPixels,
glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D,
glCopyTexSubImage2D, glCopyTexSubImage3D, glDrawPixels,
glPixelStore, glPixelTransfer, glPrioritizeTextures,
glTexEnv, glTexGen, glTexImage1D, glTexImage2D,
glTexImage3D, glTexSubImage1D, glTexSubImage2D,
glTexSubImage3D
void glTexSubImage1D(int target, int level, int xoffset, object|mapping(string:object) width, object|mapping(string:object) format, object|mapping(string:object) type, object|mapping(string:object) data)
Texturing maps a portion of a specified texture image onto each
graphical primitive for which texturing is enabled. To enable or
disable one-dimensional texturing, call glEnable and glDisable
with argument GL_TEXTURE_1D.
glTexSubImage1D redefines a contiguous subregion of an existing
one-dimensional texture image. The texels referenced by data
replace the portion of the existing texture array with x indices
xoffset and
xoffset+width-1
, inclusive. This region may not include any texels outside the range
of the texture array as it was originally specified. It is not an
error to specify a subtexture with width of 0, but such a
specification has no effect.
If a non-zero named buffer object is bound to the
GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer) while a texture
image is specified, data is treated as a byte offset into the
buffer object's data store.
targetSpecifies the target texture. Must be GL_TEXTURE_1D.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
xoffsetSpecifies a texel offset in the x direction within the texture array.
widthSpecifies the width of the texture subimage.
formatSpecifies the format of the pixel data. The following symbolic values
are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
typeSpecifies the data type of the pixel data. The following symbolic
values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP,
GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT,
GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
dataSpecifies a pointer to the image data in memory.
GL_INVALID_ENUM is generated if target is not one of the
allowable values.
GL_INVALID_ENUM is generated if format is not an accepted
format constant.
GL_INVALID_ENUM is generated if type is not a type constant.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not GL_COLOR_INDEX.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2max, where max is the returned value of
GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if
xoffset<-b
, or if
(xoffset+width)>(w-b)
, where w is the GL_TEXTURE_WIDTH, and b is the width of
the GL_TEXTURE_BORDER of the texture image being modified. Note
that w includes twice the border width.
GL_INVALID_VALUE is generated if width is less than 0.
GL_INVALID_OPERATION is generated if the texture array has not been
defined by a previous glTexImage1D operation.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
unpacked from the buffer object such that the memory reads required
would exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glTexSubImage1D is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glTexSubImage1D is available only if the GL version is 1.1 or
greater.
Texturing has no effect in color index mode.
glPixelStore and glPixelTransfer modes affect texture images in
exactly the way they affect glDrawPixels.
Formats GL_BGR, and GL_BGRA and types GL_UNSIGNED_BYTE_3_3_2,
GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
GL_UNSIGNED_INT_2_10_10_10_REV are available only if the GL version
is 1.2 or greater.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glTexSubImage1D
specifies a one-dimensional subtexture for the current texture unit,
specified with glActiveTexture.
When the ARB_imaging extension is supported, the RGBA components
specified in data may be processed by the imaging pipeline. See
glTexImage1D for specific details.
glActiveTexture, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glDrawPixels, glPixelStore,
glPixelTransfer, glTexEnv, glTexGen, glTexImage1D,
glTexImage2D, glTexImage3D, glTexParameter,
glTexSubImage2D, glTexSubImage3D
void glTexSubImage2D(int target, int level, int xoffset, int yoffset, object|mapping(string:object) width, object|mapping(string:object) height, object|mapping(string:object) format, object|mapping(string:object) type, object|mapping(string:object) data)
Texturing maps a portion of a specified texture image onto each
graphical primitive for which texturing is enabled. To enable and
disable two-dimensional texturing, call glEnable and glDisable
with argument GL_TEXTURE_2D.
glTexSubImage2D redefines a contiguous subregion of an existing
two-dimensional texture image. The texels referenced by data
replace the portion of the existing texture array with x indices
xoffset and
xoffset+width-1
, inclusive, and y indices yoffset and
yoffset+height-1
, inclusive. This region may not include any texels outside the range
of the texture array as it was originally specified. It is not an
error to specify a subtexture with zero width or height, but such a
specification has no effect.
If a non-zero named buffer object is bound to the
GL_PIXEL_UNPACK_BUFFER target (see glBindBuffer) while a texture
image is specified, data is treated as a byte offset into the
buffer object's data store.
targetSpecifies the target texture. Must be GL_TEXTURE_2D,
GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
levelSpecifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
xoffsetSpecifies a texel offset in the x direction within the texture array.
yoffsetSpecifies a texel offset in the y direction within the texture array.
widthSpecifies the width of the texture subimage.
heightSpecifies the height of the texture subimage.
formatSpecifies the format of the pixel data. The following symbolic values
are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE,
GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,
GL_LUMINANCE, and GL_LUMINANCE_ALPHA.
typeSpecifies the data type of the pixel data. The following symbolic
values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP,
GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, GL_INT,
GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV,
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV.
dataSpecifies a pointer to the image data in memory.
GL_INVALID_ENUM is generated if target is not
GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,
GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if format is not an accepted
format constant.
GL_INVALID_ENUM is generated if type is not a type constant.
GL_INVALID_ENUM is generated if type is GL_BITMAP and
format is not GL_COLOR_INDEX.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than
log2max, where max is the returned value of
GL_MAX_TEXTURE_SIZE.
GL_INVALID_VALUE is generated if
xoffset<-b
,
(xoffset+width)>(w-b)
,
yoffset<-b
, or
(yoffset+height)>(h-b)
, where w is the GL_TEXTURE_WIDTH, h is the
GL_TEXTURE_HEIGHT, and b is the border width of the texture
image being modified. Note that w and h include twice the
border width.
GL_INVALID_VALUE is generated if width or height is less
than 0.
GL_INVALID_OPERATION is generated if the texture array has not been
defined by a previous glTexImage2D operation.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,
GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and
format is not GL_RGB.
GL_INVALID_OPERATION is generated if type is one of
GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,
GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV,
GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV,
GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV
and format is neither GL_RGBA nor GL_BGRA.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the buffer
object's data store is currently mapped.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and the data would be
unpacked from the buffer object such that the memory reads required
would exceed the data store size.
GL_INVALID_OPERATION is generated if a non-zero buffer object name
is bound to the GL_PIXEL_UNPACK_BUFFER target and data is not
evenly divisible into the number of bytes needed to store in memory a
datum indicated by type.
GL_INVALID_OPERATION is generated if glTexSubImage2D is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glTexSubImage2D is available only if the GL version is 1.1 or
greater.
Texturing has no effect in color index mode.
glPixelStore and glPixelTransfer modes affect texture images in
exactly the way they affect glDrawPixels.
Formats GL_BGR, and GL_BGRA and types GL_UNSIGNED_BYTE_3_3_2,
GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,
GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,
GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1,
GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8,
GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and
GL_UNSIGNED_INT_2_10_10_10_REV are available only if the GL version
is 1.2 or greater.
For OpenGL versions 1.3 and greater, or when the
ARB_multitexture extension is supported, glTexSubImage2D
specifies a two-dimensional subtexture for the current texture unit,
specified with glActiveTexture.
When the ARB_imaging extension is supported, the RGBA components
specified in data may be processed by the imaging pipeline. See
glTexImage1D for specific details.
glActiveTexture, glCopyTexImage1D, glCopyTexImage2D,
glCopyTexSubImage1D, glCopyTexSubImage2D,
glCopyTexSubImage3D, glDrawPixels, glPixelStore,
glPixelTransfer, glTexEnv, glTexGen, glTexImage1D,
glTexImage2D, glTexImage3D, glTexSubImage1D,
glTexSubImage3D, glTexParameter
void glTranslate(float|int|array(float|int) x, float|int|void y, float|int|void z)
glTranslate produces a translation by (x, y, z). The
current matrix (see glMatrixMode) is multiplied by this translation
matrix, with the product replacing the current matrix, as if
glMultMatrix were called with the following matrix for its
argument:
(
| 1 | 0 | 0 | x |
| 0 | 1 | 0 | y |
| 0 | 0 | 1 | z |
| 0 | 0 | 0 | 1 |
If the matrix mode is either GL_MODELVIEW or GL_PROJECTION, all
objects drawn after a call to glTranslate are translated.
Use glPushMatrix and glPopMatrix to save and restore the
untranslated coordinate system.
xyzSpecify the x, y, and z coordinates of a translation vector.
GL_INVALID_OPERATION is generated if glTranslate is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glMatrixMode, glMultMatrix, glPushMatrix, glRotate,
glScale
void glVertex(float|int x, float|int y, float|int|void z, float|int|void w)
void glVertex(array(float|int) v)
glVertex commands are used within glBegin/glEnd pairs to
specify point, line, and polygon vertices. The current color, normal,
texture coordinates, and fog coordinate are associated with the vertex
when glVertex is called.
When only x and y are specified, z defaults to 0 and w defaults to 1. When x, y, and z are specified, w defaults to 1.
xyzwSpecify x, y, z, and w coordinates of a vertex. Not all parameters are present in all forms of the command.
vSpecifies an array of two, three, or four elements. The elements of a two-element array are x and y; of a three-element array, x, y, and z; and of a four-element array, x, y, z, and w.
Invoking glVertex outside of a glBegin/glEnd pair results in
undefined behavior.
glBegin, glCallList, glColor, glEdgeFlag, glEvalCoord,
glFogCoord, glIndex, glMaterial, glMultiTexCoord,
glNormal, glRect, glTexCoord, glVertexPointer
void glVertexPointer(int size, int type, int stride, System.Memory pointer)
glVertexPointer specifies the location and data format of an array
of vertex coordinates to use when rendering. size specifies the
number of coordinates per vertex, and must be 2, 3, or 4. type
specifies the data type of each coordinate, and stride specifies
the byte stride from one vertex to the next, allowing vertices and
attributes to be packed into a single array or stored in separate
arrays. (Single-array storage may be more efficient on some
implementations; see glInterleavedArrays.)
If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
target (see glBindBuffer) while a vertex array is specified,
pointer is treated as a byte offset into the buffer object's data
store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
saved as vertex array client-side state
(GL_VERTEX_ARRAY_BUFFER_BINDING).
When a vertex array is specified, size, type, stride, and pointer are saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the vertex array, call glEnableClientState
and glDisableClientState with the argument GL_VERTEX_ARRAY. If
enabled, the vertex array is used when glArrayElement,
glDrawArrays, glMultiDrawArrays, glDrawElements,
glMultiDrawElements, or glDrawRangeElements is called.
sizeSpecifies the number of coordinates per vertex. Must be 2, 3, or 4. The initial value is 4.
typeSpecifies the data type of each coordinate in the array. Symbolic
constants GL_SHORT, GL_INT, GL_FLOAT, or GL_DOUBLE are
accepted. The initial value is GL_FLOAT.
strideSpecifies the byte offset between consecutive vertices. If stride is 0, the vertices are understood to be tightly packed in the array. The initial value is 0.
pointerSpecifies a pointer to the first coordinate of the first vertex in the array. The initial value is 0.
GL_INVALID_VALUE is generated if size is not 2, 3, or 4.
GL_INVALID_ENUM is generated if type is not an accepted value.
GL_INVALID_VALUE is generated if stride is negative.
glVertexPointer is available only if the GL version is 1.1 or
greater.
The vertex array is initially disabled and isn't accessed when
glArrayElement, glDrawElements, glDrawRangeElements,
glDrawArrays, glMultiDrawArrays, or glMultiDrawElements is
called.
Execution of glVertexPointer is not allowed between the execution
of glBegin and the corresponding execution of glEnd, but an
error may or may not be generated. If no error is generated, the
operation is undefined.
glVertexPointer is typically implemented on the client side.
Vertex array parameters are client-side state and are therefore not
saved or restored by glPushAttrib and glPopAttrib. Use
glPushClientAttrib and glPopClientAttrib instead.
glArrayElement, glBindBuffer, glColorPointer,
glDisableClientState, glDrawArrays, glDrawElements,
glDrawRangeElements, glEdgeFlagPointer, glEnableClientState,
glFogCoordPointer, glIndexPointer, glInterleavedArrays,
glMultiDrawArrays, glMultiDrawElements, glNormalPointer,
glPopClientAttrib, glPushClientAttrib,
glSecondaryColorPointer, glTexCoordPointer, glVertex,
glVertexAttribPointer
void glViewport(int x, int y, int width, int height)
glViewport specifies the affine transformation of x and y
from normalized device coordinates to window coordinates. Let
(xnd, ynd) be normalized device coordinates.
Then the window coordinates (xw, yw)
are computed as follows:
xw=(xnd+1)(width/2)+x
yw=(ynd+1)(height/2)+y
Viewport width and height are silently clamped to a range that depends
on the implementation. To query this range, call glGet with
argument GL_MAX_VIEWPORT_DIMS.
xySpecify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
widthheightSpecify the width and height of the viewport. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
GL_INVALID_VALUE is generated if either width or height
is negative.
GL_INVALID_OPERATION is generated if glViewport is executed
between the execution of glBegin and the corresponding execution of
glEnd.
glDepthRange
Low-level functions needed to do 'modern' OpenGL rendering.
You probably want to start by looking at the GLSLUtils module,
or the examples included in the module.
constant GL.GLSL.GLSL_FLOAT_SIZE
constant GL.GLSL.GL_ALPHA16F_ARB
constant GL.GLSL.GL_ALPHA32F_ARB
constant GL.GLSL.GL_ARRAY_BUFFER
constant GL.GLSL.GL_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_COLOR_ARRAY
constant GL.GLSL.GL_COLOR_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_COLOR_ATTACHMENT0_EXT
constant GL.GLSL.GL_COLOR_ATTACHMENT1_EXT
constant GL.GLSL.GL_COLOR_ATTACHMENT2_EXT
constant GL.GLSL.GL_COLOR_ATTACHMENT3_EXT
constant GL.GLSL.GL_COLOR_ATTACHMENT4_EXT
constant GL.GLSL.GL_DEPTH_ATTACHMENT_EXT
constant GL.GLSL.GL_DEPTH_CLAMP_NV
constant GL.GLSL.GL_DEPTH_COMPONENT
constant GL.GLSL.GL_DEPTH_COMPONENT16
constant GL.GLSL.GL_DEPTH_COMPONENT24
constant GL.GLSL.GL_DEPTH_COMPONENT32
constant GL.GLSL.GL_DRAW_FRAMEBUFFER_EXT
constant GL.GLSL.GL_DYNAMIC_COPY
constant GL.GLSL.GL_DYNAMIC_DRAW
constant GL.GLSL.GL_DYNAMIC_READ
constant GL.GLSL.GL_EDGE_FLAG_ARRAY
constant GL.GLSL.GL_EDGE_FLAG_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_ELEMENT_ARRAY_BUFFER
constant GL.GLSL.GL_ELEMENT_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_FRAGMENT_SHADER
constant GL.GLSL.GL_FRAMEBUFFER_COMPLETE_EXT
constant GL.GLSL.GL_FRAMEBUFFER_EXT
constant GL.GLSL.GL_GENERATE_MIPMAP
constant GL.GLSL.GL_GENERATE_MIPMAP_HINT
constant GL.GLSL.GL_INDEX_ARRAY
constant GL.GLSL.GL_INDEX_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_INTENSITY16F_ARB
constant GL.GLSL.GL_INTENSITY32F_ARB
constant GL.GLSL.GL_LUMINANCE16F_ARB
constant GL.GLSL.GL_LUMINANCE32F_ARB
constant GL.GLSL.GL_LUMINANCE8_EXT
constant GL.GLSL.GL_LUMINANCE_ALPHA16F_ARB
constant GL.GLSL.GL_LUMINANCE_ALPHA32F_ARB
constant GL.GLSL.GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB
constant GL.GLSL.GL_NORMAL_ARRAY
constant GL.GLSL.GL_NORMAL_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_POINT_SPRITE
constant GL.GLSL.GL_READ_FRAMEBUFFER_EXT
constant GL.GLSL.GL_RGB16F_ARB
constant GL.GLSL.GL_RGB32F_ARB
constant GL.GLSL.GL_RGBA16F_ARB
constant GL.GLSL.GL_RGBA32F_ARB
constant GL.GLSL.GL_SECONDARY_COLOR_ARRAY
constant GL.GLSL.GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_STATIC_COPY
constant GL.GLSL.GL_STATIC_DRAW
constant GL.GLSL.GL_STATIC_READ
constant GL.GLSL.GL_STREAM_COPY
constant GL.GLSL.GL_STREAM_DRAW
constant GL.GLSL.GL_STREAM_READ
constant GL.GLSL.GL_TEXTURE_COORD_ARRAY
constant GL.GLSL.GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_TEXTURE_RECTANGLE_ARB
constant GL.GLSL.GL_VERTEX_ARRAY
constant GL.GLSL.GL_VERTEX_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
constant GL.GLSL.GL_VERTEX_PROGRAM_POINT_SIZE
constant GL.GLSL.GL_VERTEX_SHADER
constant GL.GLSL.GL_WEIGHT_ARRAY_BUFFER_BINDING
void glActiveTexture(int texture_unit)
void glAttachShader(int program, int shader)
void glBindBuffer(int target, int buffer)
void glBindFramebufferEXT(int which, int fbo)
void glBindRenderbufferEXT(int renderbuffer)
void glBufferData(int target, System.Memory data, int usage)
void glBufferData(int target, array(float) data, int usage)
void glBufferData(int target, int size, int usage)
void glBufferData(int target, int offset, System.Memory data)
void glBufferData(int target, int offset, System.Memory data, int data_start, int data_len)
void glBufferData(int target, int offset, array(float) data)
int glCheckFramebufferStatusEXT()
void glColorPointer(int size, int type, int stride, int offset)
void glCompileShader(int shader)
int glCreateProgram()
int glCreateShader(int type)
void glDisableClientState(int state)
void glDisableVertexAttribArray(int index)
void glDrawArrays(int mode, int first, int count)
void glEdgeFlagPointer(int stride, int offset)
void glEnableClientState(int state)
void glEnableVertexAttribArray(int index)
void glFogCoordPointer(int type, int stride, int offset)
void glFramebufferRenderbufferEXT(int attachment, int renderbuffer_object)
void glFramebufferTexture2DEXT(int attachment, int type, int texture, int mipmap)
array(int) glGenBuffers(int num)
array(int) glGenFramebuffersEXT(int num)
array(int) glGenRenderbuffersEXT(int num)
int glGenerateMipmapEXT(int target)
int glGetAttribLocation(int progra, string name)
void glVertexAttrib(int location, float value)
void glVertexAttrib(int location, float v1, float v2)
void glVertexAttrib(int location, float v1, float v2, float v3)
void glVertexAttrib(int location, float v1, float v2, float v3, float v4)
void glGetUniformLocation(int program, string uniform)
bool glIsBuffer(int id)
void glLinkProgram(int program)
void glMultiTexCoord(int texture_unit, float x)
void glMultiTexCoord(int texture_unit, float x, float y)
void glMultiTexCoord(int texture_unit, float x, float y, float z)
void glNormalPointer(int type, int stride, int offset)
void glRenderbufferStorageET(int type, int width, int height)
void glSecondaryColorPointer(int size, int type, int stride, int offset)
void glShaderSource(int shader, string source)
void glTexCoordPointer(int size, int type, int stride, int offset)
int glTexImage2DNoImage(int target, int level, int internal, int width, int height, int border, int format, int type)
This is used by the framebuffer code on the pikelevel.
void glUseProgram(int program)
void glVertexAttribPointer(int index, int size, int type, bool normalize, int stride, System.Memory data)
void glVertexAttribPointer(int index, int size, int type, bool normalize, int stride, int offset)
void glVertexPointer(int size, int type, int stride, int offset)
This module contains various utilities that greatly simplifies working with GLSL and some other extensions such as vertex buffers and render buffers.
void add_shader_define(string x)
Add a preprocessing define that will be used for all shader compilations from now forward.
void add_shader_path(string x)
Adds a directory to the list of directories where shaders can be found.
void clear_shader_defines()
Remove all preprocessing defines.
GLSLProgram get_program(string filename)
Convenice function to compile and cache a GLSLProgram
void set_shader_ext(string x)
Set the extension added to all shader filerequests. The default is to never add an extension, which means that the full filename has to be specified.
class GL.GLSLUtils.GLSLProgramThis class keeps track of all state related to a GLSL program, such as the shaders (vertex and pixel), the uniform variables and any vertex buffer objects or textures.
void add_texture(string name, int|object type_or_texture, int|void id)
Adds a texture to the list of textures used by the shader. If this function is used the allocation of texture units is done automatically by this class.
There are really two variants of this function: If
type_or_texture is an integer, the id indicates the
texture object ID (as given by glGenTextures), and
type_or_texture indicates the texture type (GL_TEXTURE_2D
etc).
If type_or_texture is an object, it's assumed that there is
a texture_type member variable (indicating the texture type,
such as GL_TEXTURE_2D) and a use method that will bind the
texture to the currently active texture unit.
The GLUE.Texture class meets these requirements. The
RenderBuffer objects does not, however.
A RenderBuffer can be added as an texture by calling
add_texture( name, buffer->texture_type, buffer->texture )
There are currently no checks done to ensure that you don't use more textures than there are texture units on your graphics card.
void add_vertex_buffer(VertexBuffer vbo)
Add all vertex attributes defined in the VertexBuffer vbo.
This is equivalent to calling vertex_pointer once for each
attribute (with the difference that stride, size and offset
are calculated automatically for you)
int compile_file(string file_name)
Compile the shader source found in file_name. If filename is
relative, the paths added by add_shader_path will be
searched. If -1 is returned, no file was compiled.
This function is usually called from the create method, but
if no filename is passed there you can call this function (or
the compile_string function) to specify the source.
The file is compiled twice, once with VERTEX_SHADER defined, the other time with FRAGMENT_SHADER defined.
The functions vertex_main and fragment_main are special, in that when the vertex shader is compiled vertex_main is renamed to main and fragment_main is totally removed from the source. When the fragment shader is compiled it's the other way around.
int compile_string(string code, string path)
Compile the given string as a pixel/vertex shader. The string is compiled twice, once with VERTEX_SHADER defined, the other time with FRAGMENT_SHADER defined.
The functions vertex_main and fragment_main are special, in that when the vertex shader is compiled vertex_main is renamed to main and fragment_main is totally removed from the source. When the fragment shader is compiled it's the other way around.
This is done to make it easier to develop shaders, it's generally speaking more convenient to have them in one file that it is to have them in two.
GL.GLSLUtils.GLSLProgram GL.GLSLUtils.GLSLProgram(string|void name)
Create a new GLSL shader. If name is specified, it
indicates a filename passed to compile_file.
void disable()
Disable this program. This will also disable all extra texture units that were needed to render with it, if any, and unbind the vertex pointer attributes, if any.
void draw(function(:void) x, mixed ... args)
Call the function x(@args) with this program activated.
This will bind all texture units to their correct textures, set up any vertex pointers that have been defined, and set uniforms to their value.
Once the function has been called, all texture units except the default one will be disabled, and the vertex array pointers will be reset.
void set(string name, mixed ... to)
Set the uniform variable name to the value to (one or
more floats or integers). The value will remain in effect
until the next time this function is called (even if another
program is used in between)
void use()
Enable the program, setting all uniform variables to their
values as set by set, enabling the required number of
texture units and binding the correct textures, as given by
add_texture and finally initializing any vertex pointers
set using vertex_pointer or add_vertex_buffer.
void vertex(string name, mixed ... to)
Set the vertex attribute name to to. to is one or
more floats or integers.
The attibute will have this value for all new glVertex calls until this function is called again.
void vertex_pointer(string name, int ptr, int size, int type, bool normalize, int stride, int offset)
Add a single vertex attribute pointer. This is usually used in combination with glDrawArrays to quickly draw a lot of primitives.
name is the name of the vertex type variable in the program.
ptr is the vertex buffer ID.
size is the size of the attribute (a vec3 has size 3, as an example)
type is the type, usually GL_FLOAT (actually, anything else
requires extensions not currently supported by this class)
If normalize is true, the value will be clamped between 0.0 and 1.0.
stride is the distance between two attributes of this type
in the buffer, and offset is the offset from the start of
the buffer to the first attribute.
class GL.GLSLUtils.RenderBufferA rendering buffer. This is usually used to do offscreeen-rendering with higher precision, or full-screen special effects such as blur etc. This class is not present if there is no FramebufferTexture2DEXT extention available. To my knowledge all cards with GLSL support also support this feature.
bool GL.GLSLUtils.RenderBuffer.mipmaps
bool GL.GLSLUtils.RenderBuffer.alpha
Does the RenderBuffer has mipmaps and alpha channel?
int GL.GLSLUtils.RenderBuffer.db
The object ID of the depth buffer object, if any. Otherwise -1
int GL.GLSLUtils.RenderBuffer.fbo
The object ID of the FBO object
int GL.GLSLUtils.RenderBuffer.internal_format
int GL.GLSLUtils.RenderBuffer.format
The format of the texture object
int GL.GLSLUtils.RenderBuffer.width
int GL.GLSLUtils.RenderBuffer.height
Width and height, in pixels, of the buffer
int GL.GLSLUtils.RenderBuffer.texture
The object ID of the texture object.
int GL.GLSLUtils.RenderBuffer.texture_type
The type of the texture, GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB typically.
void box(float x, float y, float w, float h)
Draw the buffer using a GL_QUADS at x,y sized w,h. This function knows about GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB texture coordinates, but not any other ones.
GL.GLSLUtils.RenderBuffer GL.GLSLUtils.RenderBuffer(int w, int h, int type, bool depth, bool mipmap, bool alpha, int|void internal_format, int|void format)
Create a new render buffer, with the size given by w and
h, the texture target will be type (generally speaking
GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB, the latter is
needed if the size is not a power of two. This is not checked
by the create function)
depth mipmap and alpha specifies if the corresponding
extra buffers should be created.
mipmap is not supported for GL_TEXTURE_RECTANGLE_ARB
If w or h is 0, the actual texture creation is postponed
until resize is called. The buffer will not be valid before
it has a size.
If internal_format and format are specified they are used to
override the defaults (GL_RGB[A]16F_ARB and GL_RGB[A]
respectively)
Setting these also makes the buffer ignore the alpha paramenter.
The mipmap parameter depends on the existance of the
glGenerateMipmapEXT extension.
void disable()
Restore the viewport and bind the screen as the active rendering buffer.
void draw(function(:void) f, mixed ... args)
Convenience function that binds the buffer as the currently
active destination buffer, then calls f and finally binds
the default framebuffer (generally speaking the screen) as the
active buffer again.
This is equivalent to use followed by f(args)
followed by disable
This function is usually what is used to draw into a RenderBuffer.
void draw_texture(function(:void) f)
Bind the buffer to the currently active texture unit, then call the specified function.
bool resize(int w, int h)
Resize the buffer to a new size. Returns true if a new texture was created.
array(float) size()
Width and height, suitable for texture coordinates, of the buffer. For GL_TEXTURE_2D this is always 1.0 x 1.0. For GL_TEXTURE_RECTANGLE_ARB it's the pixel sizes (as floats)
This function knows about GL_TEXTURE_2D and GL_TEXTURE_RECTANGLE_ARB texture coordinates, but not any other ones.
void use()
Set the viewport to the size of the texture, and set this buffer as the currently active destination framebuffer.
disable() must be called (exactly once) once you are done drawing into this buffer, or OpenGL will run out of attribute stack space eventually since the current viewport is pused to it.
draw will do the use() / disable() handling for you.
class GL.GLSLUtils.VertexBufferThis class defines a vertex buffer. This is a chunk of memory defining vertex attributes for future drawing. Any number of vertex buffers (up to a hardware specific limit) can be added to any GLSLProgram.
Vertex buffers are generally speaking stored on the graphic card for fast access, making it possible to draw huge amounts of primitives without using all available CPU->GPU memory bandwidth.
Normal usage of this class is to create it, then call add_[type]
for each vertex attribute (add_float, add_vec2 etc) defined
in your program, then call set_size or set_data to set the
size of the buffer, add the VertexBuffer to any relevant
GLSLProgram instances, and then optionally call pwrite,
vertex or stream() to update the data.
The add_* functions can not be called once the VertexBuffer has
been added to a GLSLProgram. set_size, set_data or recalc
must be called before the VertexBuffer is added to a
GLSLProgram.
int GL.GLSLUtils.VertexBuffer.current_size
The maximum offset ever written using stream
int GL.GLSLUtils.VertexBuffer.id
The vertexbuffer id (the object id passed to glBindBuffer).
int GL.GLSLUtils.VertexBuffer.offset
The index of the last vertex that was written using stream
int GL.GLSLUtils.VertexBuffer.size
The total size of the VertexBuffer, counted in vertices
int GL.GLSLUtils.VertexBuffer.stride
The size of a single vertex, in bytes
int GL.GLSLUtils.VertexBuffer.vertex_size
The size of a single vertex, in floats
void add_alias(string name, string name2, int|void size)
Add name as an alias for name2. As an example
add_alias( "normal", "pos") will make the vertex attribute
normal have the same value as pos without using additional
storage.
The size can be smaller than the size for the original attribute, but never larger. If no size is given they will have the same size.
void add_attribute(string name, int type, bool normalize, int size)
Add a generic attribute named name, of the type type
(eg, GL_FLOAT), normalize or not of size size.
As an example add_vec2(name) is an alias for add_attribute(
name, GL_FLOAT, GL_FALSE, 2 )
void add_float(string name)
Add a float attribute named name.
void add_vec2(string name)
Add a vec2 attribute named name.
void add_vec3(string name)
Add a vec3 attribute named name.
void add_vec4(string name)
Add a vec4 attribute named name.
array(array(string|int|bool)) attributes()
Method used by GLSLProgram to get a list of the attributes.
GL.GLSLUtils.VertexBuffer GL.GLSLUtils.VertexBuffer(int draw_mode)
Create a new vertex buffer, draw_mode is a usage hint.
GL_STREAM_DRAW: Draw multiple times, updating the data ocassionally GL_STATIC_DRAW: Set the data once, then draw multiple times GL_DYNAMIC_DRAW: Draw and update all the time
The mode is only a hint, it does not really affect the functionality of the buffer.
void pwrite(int offset, array(float) data)
Write data at the byteoffset offset. The size of a
vertex is given by the stride member variable in this
class.
It's usually more convenient to use the vertex or stream
methods when updating data.
void recalc()
Recalculate the offsets for all attributes. Normally called automatically from set_data and set_size.
void set_data(array(float) data)
Set the data to an array of floating point numbers. The attributes are always ordered in the array according to the order the various add_* functions were called. Note that add_alias does not add a new attribute, only an alias for an existing one.
void set_size(int size)
Set the size of the VertexBuffer. The size is given in
stride increments. That is, it defines the number of
complete vertexes that can be generated from this buffer, not
the number of floats or bytes in it.
set_size will remove all the data that was previously
present in the buffer.
void stream(array(float) data)
Append the data to the current object. Once the end of the
buffer has been reached, start over from the beginning. This
is useful for particle systems of various kinds, where each
vertex (or every few vertices) indicate a separate particle
that evolves over time using a GLSLProgram, and there is no
need to send the whole list to the graphic card each frame.
When calling glDrawArrays using this kind of VertexBuffer, use the current_size member variable, it indicates the last fully written vertice.
void vertex(int vertex, array(float) data)
Give data starting at the given vertex. Any number of vertices up to the full size of the VertexBuffer can be written from this point onwards.
class GL.GLSLUtils.VertexBuffer.Attributestring GL.GLSLUtils.VertexBuffer.Attribute.name
int GL.GLSLUtils.VertexBuffer.Attribute.type
bool GL.GLSLUtils.VertexBuffer.Attribute.normalize
int GL.GLSLUtils.VertexBuffer.Attribute.size
int GL.GLSLUtils.VertexBuffer.Attribute.offset
protected local void __create__(string name, int type, bool normalize, int size, int offset)
GL.GLSLUtils.VertexBuffer.Attribute GL.GLSLUtils.VertexBuffer.Attribute(string name, int type, bool normalize, int size, int offset)
class GL.GLSLUtils.vecA very basic vector class. Use vec2 / vec3 or vec4
class GL.GLSLUtils.vec2A vector class somewhat similar to a GLSL vec2.
inherit vec : vec
class GL.GLSLUtils.vec3A vector class somewhat similar to a GLSL vec3.
inherit vec : vec
class GL.GLSLUtils.vec4A vector class somewhat similar to a GLSL vec4.
inherit vec : vec
The GL Utilities module is a partial implementation of the GLU library. This module only contains functions that someone at some point actually needed to get his work done. If you need a GLU function that isn't in here, copy the C code from the GLU library (Mesa was used last time), tweak it so that it compiles as Pike code and then check it in into git.
void gluLookAt(float eyex, float eyey, float eyez, float centerx, float centery, float centerz, float upx, float upy, float upz)
void gluLookAt(Math.Matrix eye, Math.Matrix center, Math.Matrix up)
gluLookAt creates a viewing matrix derived from an eye point,
a reference point indicating the center of the scene, and an
up vector. The matrix maps the reference point to the negative
z axis and the eye point to the origin, so that, when a typical
projection matrix is used, the center of the scene maps to the
center of the viewport. Similarly, the direction described by the
up vector projected onto the viewing plane is mapped to the positive
y axis so that it points upward in the viewport. The up vector must
not be parallel to the line of sight from the eye to the reference
point.
The matrix generated by gluLookAt postmultiplies the current matrix.
The relation between the matrix objects and the float values are
Math.Matrix eye = Math.Matrix( ({ eyex, eyey, eyez }) );
GL.glFrustum, gluPerspective
void gluOrtho2D(float left, float right, float bottom, float top)
gluOrtho2D sets up a two-dimensional orthographic viewing region. This is equivalent to calling
glOrtho(left, right, bottom, top, -1.0, 1.0);The GLU manual says glOrtho(a,b,c,d, 0, 1).
GL.glOrtho, gluPerspective
void gluPerspective(float fovy, float aspect, float zNear, float zFar)
gluPerspective specifies a viewing frustum into the world coordinate system. In general, the aspect ratio in gluPerspective should match the aspect ratio of the associated viewport. For example, aspect = 2.0 means the viewer's angle of view is twice as wide in x as it is in y. If the viewport is twice as wide as it is tall, it displays the image without distortion.
The matrix generated by gluPerspective is multipled by the current
matrix, just as if GL.glMultMatrix were called with the generated
matrix. To load the perspective matrix onto the current matrix stack
instead, precede the call to gluPerspective with a call to
GL.glLoadIdentity.
void gluPickMatrix(float x, float y, float width, float height, array(int) viewport)
gluPickMatrix creates a projection matrix that can be used to
restrict drawing to a small region of the viewport. This is
typically useful to determine what objects are being drawn
near the cursor. Use gluPickMatrix to restrict drawing to a
small region around the cursor. Then, enter selection mode
(with GL.glRenderMode and rerender the scene. All primitives
that would have been drawn near the cursor are identified and
stored in the selection buffer.
The matrix created by gluPickMatrix is multiplied by the current
matrix just as if GL.glMultMatrix is called with the generated
matrix. To effectively use the generated pick matrix for picking,
first call GL.glLoadIdentity to load an identity matrix onto
the perspective matrix stack. Then call gluPickMatrix, and
finally, call a command (such as gluPerspective) to multiply
the perspective matrix by the pick matrix.
When using gluPickMatrix to pick NURBS, be careful to turn off the NURBS property GLU_AUTO_LOAD_MATRIX. If GLU_AUTO_LOAD_MATRIX is not turned off, then any NURBS surface rendered is subdivided differently with the pick matrix than the way it was subdivided without the pick matrix.
viewportThe viewport is an array with four integers.
Does the NURB remark apply?
GL.glGet, glLoadIdentity, glMultMatrix, glRenderMode,
gluPerspective
array(float)|zero gluProject(float objx, float objy, float objz, array(float) model, array(float) proj, array(int) viewport)
gluProject transforms the specified object coordinates into window
coordinates using model, proj, and viewport. The result is
returned in a three valued array.
GL Universal Environment
void PushPop(function(:void) f)
Performs function f between GL.glPushMatrix and
GL.glPopMatrix calls.
PushPop() { GL.glTranslate( 0.01, -0.9, 0.0 ); write_text( "Press esc to quit" ); };
void add_reinit_callback(function(void:void) f)
Add a callback that will be called every time the resolution is about to change.
remove_reinit_callback
int allocate_light()
Allocate a hardwareaccelerated lightsource from OpenGL.
an id which may be added to the GL.GL_LIGHT0 constant.
free_light
mapping(string:mixed) debug_stuff()
Returns some internal states for debug purposes. The actual content may change.
void draw_box(float x0, float y0, float x1, float y1, array(Image.Color.Color)|Image.Color.Color c, void|array(float)|float a)
Draw a box at the specified coordinates. c is either a single
color, in which case it will be used for all corners, or an array
of four colors, which will be used for each corner.
a is similar to c, but is the alpha values for each coordinate.
void draw_line(float x0, float y0, float x1, float y1, Image.Color.Color c, void|float a)
void draw_line(float x0, float y0, float z0, float x1, float y1, float z1, Image.Color.Color c, void|float a)
void draw_obox(float x0, float y0, float x1, float y1, array(Image.Color.Color)|Image.Color.Color c, void|array(float)|float a)
Draw a box outline around the specified coordinates. c is
either a single color, in which case it will be used for all
corners, or an array of four colors, which will be used for each
corner.
a is similar to c, but is the alpha values for each coordinate.
void draw_polygon(array(float) coords, Image.Color.Color c, float a)
void free_light(int l)
Call this function to free a lightsource that has been allocated with
allocate_light.
lId which has been allocated using allocate_light.
allocate_light
array(List) get_all_lists()
Returns all defined lists. Only available on Windows.
array(BaseTexture) get_all_textures()
Returns a list of all current textures.
float get_aspect()
Returns the screen aspect.
set_aspect
int get_depth()
Returns the current color depth.
set_depth
array(string) get_drivers()
Returns the name of the available drivers.
init
int get_gl_flags()
Returns the GL flags currently used.
set_gl_flags
bool get_screen_mode()
Returns 1 if in fullscreen mode, otherwise 0.
toggle_fullscreen
int get_texture_mem_usage()
Returns the number of bytes used by the textures.
bool has_extension(string ext)
Checks if the GL extension ext is currently supported.
void hide_cursor()
Hide the mouse cursor.
void init(mapping(string:mixed)|void options)
Initializes GLUE and loads a driver from a list of drivers. If a driver fails to load or initialize, the next driver is tried.
If none of the "driver_names" is listed in the result
from get_drivers an error will be thrown.
options | The name of a driver or a list of drivers to try, in given
order. If no driver name is given, the list given by
|
| This callback is called with a |
| This callback is called with the aspect whenever the drawing area is resized, either by an event or explicitly by the program. |
| Set fullscreen/window mode. 1 is fullscreen, 0 is window. Defaults to fullscreen. |
| Sets the resolution of the drawing area. Defaults to ({ 800, 600 }). |
| Sets the aspect of the drawing area. Defaults to 1.333333 (4:3). |
| Sets the color depth of the drawing area. Defaults to 32. |
| Sets the window title to this string. |
| Sets the icon title to this string. |
| Use |
| The rotation in z-axis of the drawing field. |
| Mirroring in x and/or y axis. |
get_drivers
BaseTexture make_rect_texture(mapping|Image.Image image, string|void name)
Create a texture with the specified image as contents. Will try
to use the TEXTURE_RECTANGLE_NV extension if available, otherwise
normal textures will be used (like make_texture).
make_texture
BaseTexture make_texture(mapping|Image.Image image, string|void name)
Create a texture. Mainly here for symetry with make_rect_texture
Texture, make_rect_texture
void mirror_screen(string how)
Mirrors the screen in x and/or y axis. Useful e.g. when drawing for backlight projection.
howA string that contains the mirror axis, e.g. "x" or
"xy".
bool only_dynlists()
Returns 1 if all defined lists are DynList lists.
int(0..) pushpop_depth()
Returns the PushPop depth, i.e. the number of pushes awaiting corresponding pops.
void remove_reinit_callback(function(void:void) f)
Removes a reinitialization callback.
add_reinit_callback
void set_aspect(float asp)
void set_aspect(int w, int h)
Set the aspect of the draw area. Does nothing if the provided aspect is equal to the one currently used.
get_aspect
void set_depth(int _depth)
Sets the color depth.
get_depth
void set_gl_flags(int _gl_flags)
Sets the GL flags.
get_gl_flags
void set_resolution(int w, int h)
Sets the resolution to wxh pixels.
xsize, ysize
void set_screen_rotation(float deg)
Rotates the drawing area deg degrees. Useful e.g. when drawing
for tilted monitors.
void show_cursor()
Show the mouse cursor.
void swap_buffers()
Swap the drawing buffer and the viewing buffer.
void toggle_fullscreen(void|bool _fullscreen)
Toggles between fullscreen and window mode. If a screen mode is provided, that mode will be assumed.
get_screen_mode
int xsize()
int ysize()
Returns the screen width/height.
set_resolution
class GLUE.BaseDWIMA mixin class with a dwim create function.
GLUE.BaseDWIM GLUE.BaseDWIM(mixed ... args)
This create function has the following heuristic:
If a mapping is encountered, the following information will be attempted to be extracted.
| The texture image. |
| The image dimensions. If not provided, the dimensions of the
|
| |
| |
| |
| The alpha mode. |
| Should the texture be mipmapped or not. |
| Should the texture be clamped or not. |
| The texture mode. |
| The debug name associated with this texture. |
If an object is encountered in the argument list, the first object will be used as texture image and the second as texture alpha.
If a string is encountered in the argument list, it will be used as debug name associated with this texture.
Once all mappings, strings and objects are removed from the argument list, the remaining integers will be interpreted as width, height, alpha, mipmap and mode, unless there is only one argument. In that case it will be interpreted as the alpha mode.
class GLUE.BaseTextureThe texture base class. Using e.g. Texture might be more
convenient.
string GLUE.BaseTexture.debug
A string to identify the texture.
float GLUE.BaseTexture.width_u
float GLUE.BaseTexture.height_u
Utilization in percent.
int GLUE.BaseTexture.i_width
int GLUE.BaseTexture.i_height
Image dimensions
int GLUE.BaseTexture.t_width
int GLUE.BaseTexture.t_height
Texture dimensions
int GLUE.BaseTexture.texture_type
The texture type, e.g. GL.GL_TEXTURE_2D.
protected void _destruct()
Properly deallocates the texture.
int sizeof( GLUE.BaseTexture arg )
Returns the size of memory allocated by the texture.
bool res = GLUE.BaseTexture() > x
Textures can be sorted according to texture id.
void clear()
Clears the texture.
void construct(int width, int height, int _alpha, mapping|void imgs, int(2bit)|void flags, int|void _mode, string|void debug_text)
Construct a new texture. Processes _alpha, _mode and
debug_text and calls resize.
_alphaThe alpha mode the texture is operating in.
| RGB |
| RGBA |
| ALPHA |
| LUM |
| LUM+ALPHA |
_modeThe mode the texture is operating in. Autoselected wrt _alpha
if 0.
debug_textA string that can be used to identify this texture.
void coords(float x, float y)
Sets the texture coordinates to x*width,y*height.
GLUE.BaseTexture GLUE.BaseTexture(mixed ... args)
Calls construct with args.
void create_texture(mapping|void imgs, int(2bit)|void flags, int|void width, int|void height)
Actually creates the texture.
imgsIf zero, a black texture with the dimensions width *
height will be generated. Otherwise imgs should be a
mapping as follows.
| The actual image to be used as texture. It will be
cropped/padded to meet the dimensions given in |
| Optional image to be used as alpha channel, depending on the
alpha value given to |
flagsIf 1, the texture will be mipmapped.
If bit 1 (2) is set, texture will not be wrapped but clamped.
widthheightThe dimensions of the texture. If omitted the dimensions of
the images in imgs will be used.
resize
void draw(float x, float y, float z, float w, float h)
Draw the texture at x,y,z with dimensions w*h.
void draw_region(float x, float y, float z, float w, float h, float s0, float q0, float ss, float qs)
Draw texture region s0,q0 - ss,qs at x,y,z
with dimensions w*h.
int get_id()
Returns the id of this texture.
void make_mipmap(mapping imgs, int|void imode, int|void dx, int|void dy)
Renders a mipmap of the image/partial image imgs.
imgsImage data mapping to feed GL.glTexImage2D or
GL.glTexSubImage2D.
imodeInternal format to feed GL.glTexImage2D, or UNDEFINED for
partial images.
dxdyXoffs, yoffs to feed GL.glTexSubImage2D for partial images.
create_texture
void paste(zero|Image.Image i, Image.Image a, int x, int y)
Paste the image i with alpha channel a at coordinates x
and y in the current texture.
void resize(int width, int height, mapping|void imgs, int(2bit)|void flags, bool|void nocreate)
Resizes/creates a texture to meet the dimensions width and
height. If nocreate isn't given, create_texture is
called to actually perform the resize/creation.
construct
void set_image_data(Image.Image|mapping(string:mixed) data, bool|void no_resize)
Set the contents (and size) of the texture from the supplied
data. The data is identical to what would normally be sent as
the last argument to glTex[Sub]Image2D() or an Image.Image object.
If no_resize is specified, it is assumed that the data will
fit in the texture, otherwise the parts that extend beyond it
will be discarded.
dataBesides being an Image.Image object, data can be either of
two types of mappins. First it can be a mapping with Image data.
| Texture image data. |
| Optional alpha channel. |
| Optional luminance channel. |
Second it can be a mapping pointing out a shared memory segment.
| The shared memory segment. |
| The width and height of the memory segment. |
| |
| The format of the memory segment, e.g. |
| The low level format of the memory segment, e.g.
|
void use()
Use the generated texture (GL.glBindTexture).
class GLUE.DynListA displaylist that is generated on demand.
On Windows lists needs to be regenerated when the video driver
mode is changed. Thus the DynList is to prefer over List, since
regeneration is done automatically upon video mode change.
inherit List : List
void call()
Call the displaylist, ie draw it.
GLUE.DynList GLUE.DynList(function(:void)|void f)
Create a new DynList object and optionally set a function that can generate the displaylist
fFunction which contains the GL commands that generates the displaylist.
void init()
Generates the displaylist, ie calls the function set in
set_generator. Called only when the display list needs to
be generated.
void modeswitch()
Called by videodriver when a video mode change occurs.
void set_generator(function(:void) _generator)
Sets a function which can generate a displaylist. Hint: Use implicit lambda...
class GLUE.FontA font.
GLUE.Font GLUE.Font(Image.Fonts.Font font, float|void scale_width, float|void scale_spacing)
array(int|BaseTexture|Region) get_character(int c)
Returns the advance (in pixels), the texture and the texture coordinates for the specified character, or 0 if it's nonprintable.
If the font->write call fails, the backtrace will be written to stderr.
array(float) text_extents(string text, float h)
Get the width and height of the area that the string text in
size h would cover.
array(List|float) write(string text, float h, void|float|Region roi, string|void align)
Create a display list that writes text.
textThe text to write.
hThe font height
roiThe region, if supplied, to restrict writing to.
alignThe text justification; "left" (default), "center" or "right".
array(float) write_now(string text, float h, void|float|Region roi, string|void align)
Write the text in size [h], possibly restricted by region roi.
Return the width and height of the resulting text area. If roi is
a float, Region(0.0, 0.0, roi, 10000.0) will be used.
class GLUE.Font.CharacterA character to draw.
inherit Region : Region
Region GLUE.Font.Character.pos
Character position in texture txt.
Region GLUE.Font.Character.slice
Slice of character to be shown.
BaseTexture GLUE.Font.Character.txt
Texture holding the character.
void draw()
Draw the character using the texture txt with the
texture-coordinates indicated in pos, possible cropped with
slice.
void set_data(Region _pos, BaseTexture _txt, void|Region _slice)
Set character to be region _slice of region _pos of
texture _txt.
class GLUE.Font.GAHobject GLUE.Font.GAH.q
string GLUE.Font.GAH.text
float GLUE.Font.GAH.h
float|object GLUE.Font.GAH.roi
string|void GLUE.Font.GAH.align
protected local void __create__(object q, string text, float h, float|object roi, string|void align)
GLUE.Font.GAH GLUE.Font.GAH(object q, string text, float h, float|object roi, string|void align)
class GLUE.ListA display list abstraction. Automatically allocates a display list id upon creation and correctly deallocate it upon destruction.
DynList
protected void _destruct()
Deletes this list and frees the list id from the id pool.
bool res = GLUE.List() > x
List objects can be sorted according to list id.
get_id
void begin(bool|void run)
Start defining the list. If run is provided, the list will
be executed as it is compiled (GL.GL_COMPILE_AND_EXECUTE).
end, compile
void call()
Execute the commands in the list.
void compile(function(:void) f)
Compile a list be executing the list code f. Exceptions in
f will be thrown after GL.glEndList has been called.
begin
GLUE.List GLUE.List(void|function(:void) f)
When creating a new list, the list code can be compiled upon
creation by supplying a function f that performs the GL
operations.
call
List list = List() { // GL code };
void end()
Finish the list definition.
begin, compile
int get_id()
Returns this lists' id.
class GLUE.RectangleDWIMTextureConvenience version of the RectangleTexture class.
inherit BaseDWIM : BaseDWIM
Convenience methods
inherit RectangleTexture : RectangleTexture
Texture base
class GLUE.RectangleTextureUses the NVidia RECT texture extension for non-power-of-two textures.
inherit BaseTexture : BaseTexture
class GLUE.RegionA rectangle. Used by the text routines to avoid drawing outside the current region.
constant int GLUE.Region.is_region
All region objects have this constant.
float GLUE.Region.x
float GLUE.Region.y
float GLUE.Region.w
float GLUE.Region.h
protected local void __create__(float x, float y, float w, float h)
Region res = GLUE.Region() & R
Creates a new region with the intersection of this region and R.
GLUE.Region GLUE.Region(float x, float y, float w, float h)
bool inside(Region R)
Returns 1 if the region R is fully inside this region.
void move(float xp, float yp)
Move the region xp units right and yp units down.
bool outside(Region R)
Returns 1 if the region R is fully outside this region.
void resize(float xs, float ys)
Make the region xs units wider and ys units higher.
class GLUE.SquareMeshA mesh of squares.
GLUE.SquareMesh GLUE.SquareMesh(function(float, float:Math.Matrix) calculator)
The calculator will be called for each corner and should
return a 1x3 matrix describing the coordinates for the given
spot om the surface.
void draw()
Draw the mesh.
void recalculate()
Recalculate the mesh.
void set_lighting(bool do_lighting)
Indicate whether or not lighting is used. If it is, the normals of each vertex will be calculated as well as the coordinates.
void set_size(int x, int y)
Set the size of the mesh
void set_texture(BaseTexture tex)
Set a texture to be mapped on the mesh.
Math.Matrix surface_normal(int x, int y)
Return the normal for the surface at coordinates x,y. Used internally.
class GLUE.TextureConvenience version of the Texture class.
inherit BaseDWIM : BaseDWIM
Convenience methods
inherit BaseTexture : BaseTexture
Texture base
GLUE Event abstraction.
constant int GLUE.Events.BACKSPACE
constant int GLUE.Events.DELETE
constant int GLUE.Events.TAB
constant int GLUE.Events.F1
constant GLUE.Events.F2
constant GLUE.Events.F3
constant GLUE.Events.F4
constant GLUE.Events.F5
constant GLUE.Events.F6
constant GLUE.Events.F7
constant GLUE.Events.F8
constant GLUE.Events.F9
constant GLUE.Events.F10
constant GLUE.Events.F11
constant GLUE.Events.F12
constant int GLUE.Events.ESCAPE
constant int GLUE.Events.UP
constant int GLUE.Events.DOWN
constant int GLUE.Events.LEFT
constant int GLUE.Events.RIGHT
constant int GLUE.Events.PGUP
constant int GLUE.Events.PGDWN
constant int GLUE.Events.ENTER
constant int GLUE.Events.SPACE
constant int GLUE.Events.HOME
constant int GLUE.Events.END
constant int GLUE.Events.PAUSE
constant int GLUE.Events.INSERT
constant int GLUE.Events.SCROLL_LOCK
constant int GLUE.Events.SYS_REQ
constant int GLUE.Events.PRINT_SCRN
constant int GLUE.Events.CAPSLOCK
constant int GLUE.Events.MENU
constant int GLUE.Events.NUMLOCK
constant int GLUE.Events.A
constant int GLUE.Events.B
constant int GLUE.Events.C
constant int GLUE.Events.D
constant int GLUE.Events.E
constant int GLUE.Events.F
constant int GLUE.Events.G
constant int GLUE.Events.H
constant int GLUE.Events.I
constant int GLUE.Events.J
constant int GLUE.Events.K
constant int GLUE.Events.L
constant int GLUE.Events.M
constant int GLUE.Events.N
constant int GLUE.Events.O
constant int GLUE.Events.P
constant int GLUE.Events.Q
constant int GLUE.Events.R
constant int GLUE.Events.S
constant int GLUE.Events.T
constant int GLUE.Events.U
constant int GLUE.Events.V
constant int GLUE.Events.W
constant int GLUE.Events.X
constant int GLUE.Events.Y
constant int GLUE.Events.Z
Numeric constant representing a key.
constant int GLUE.Events.BUTTON_1
constant int GLUE.Events.BUTTON_2
constant int GLUE.Events.BUTTON_3
constant int GLUE.Events.BUTTON_4
constant int GLUE.Events.BUTTON_5
Numeric constant representing a mouse button.
constant int GLUE.Events.EXIT
Numeric constant representing an exit event.
constant GLUE.Events.KNOWN_MODIFIERS
Integer constant with the union of all known modifiers, i.e.
_SHFT | _CTRL | _ALT.
constant int GLUE.Events.LSHIFT
constant int GLUE.Events.RSHIFT
constant int GLUE.Events.LCTRL
constant int GLUE.Events.RCTRL
constant int GLUE.Events.LALT
constant int GLUE.Events.RALT
Numeric constant representing a modifier key.
constant GLUE.Events.MODIFIERS
Mapping that maps a modifier key to any of the symbolic modifiers
_SHFT, _CTRL and _ALT.
constant int GLUE.Events.MOUSE_UP
constant int GLUE.Events.MOUSE_DOWN
constant int GLUE.Events.MOUSE_LEFT
constant int GLUE.Events.MOUSE_RIGHT
constant int GLUE.Events.MOUSE_ABS
Numeric constant representing a mouse movement.
constant int GLUE.Events._ALT
Integer constant representing alternate.
constant int GLUE.Events._CTRL
Integer constant representing control.
constant int GLUE.Events._SHFT
Integer constant representing shift.
constant GLUE.Events.key_names
Mapping that maps key identifiers with a printable name, e.g.
LSHIFT to "Left shift".
Event ALT(int|Event X)
array(Event) ALT(array(int|Event) X)
Adds the _ALT modifier to an Event, key or array of Events
and/or keys.
Event CTRL(int|Event X)
array(Event) CTRL(array(int|Event) X)
Adds the _CTRL modifier to an Event, key or array of Events
and/or keys.
Event SHFT(int|Event X)
array(Event) SHFT(array(int|Event) X)
Adds the _SHFT modifier to an Event, key or array of Events
and/or keys.
bool is_modifier(int k)
Returns 1 if the key code k is a modifier key, e.g.
LSHIFT or RSHIFT.
class GLUE.Events.EventContains an event.
bool GLUE.Events.Event.press
Press event or release event.
float GLUE.Events.Event.pressure
The pressure of the key stroke. A value between 0.0 and 1.0. Unknown values are represented as 0.
GLUE.Events.Event GLUE.Events.Event(int|void _key, bool|void _press, string|void _data, int|void _modifiers, float|void pressure)
this_program dup()
Returns a copy of this Event object.
constant GLUT.GLUT_ACCUM
constant GLUT.GLUT_ACTIVE_ALT
constant GLUT.GLUT_ACTIVE_CTRL
constant GLUT.GLUT_ACTIVE_SHIFT
constant GLUT.GLUT_ALPHA
constant GLUT.GLUT_BLUE
constant GLUT.GLUT_CURSOR_BOTTOM_LEFT_CORNER
constant GLUT.GLUT_CURSOR_BOTTOM_RIGHT_CORNER
constant GLUT.GLUT_CURSOR_BOTTOM_SIDE
constant GLUT.GLUT_CURSOR_CROSSHAIR
constant GLUT.GLUT_CURSOR_CYCLE
constant GLUT.GLUT_CURSOR_DESTROY
constant GLUT.GLUT_CURSOR_FULL_CROSSHAIR
constant GLUT.GLUT_CURSOR_HELP
constant GLUT.GLUT_CURSOR_INFO
constant GLUT.GLUT_CURSOR_INHERIT
constant GLUT.GLUT_CURSOR_LEFT_ARROW
constant GLUT.GLUT_CURSOR_LEFT_RIGHT
constant GLUT.GLUT_CURSOR_LEFT_SIDE
constant GLUT.GLUT_CURSOR_NONE
constant GLUT.GLUT_CURSOR_RIGHT_ARROW
constant GLUT.GLUT_CURSOR_RIGHT_SIDE
constant GLUT.GLUT_CURSOR_SPRAY
constant GLUT.GLUT_CURSOR_TEXT
constant GLUT.GLUT_CURSOR_TOP_LEFT_CORNER
constant GLUT.GLUT_CURSOR_TOP_RIGHT_CORNER
constant GLUT.GLUT_CURSOR_TOP_SIDE
constant GLUT.GLUT_CURSOR_UP_DOWN
constant GLUT.GLUT_CURSOR_WAIT
constant GLUT.GLUT_DEPTH
constant GLUT.GLUT_DEVICE_IGNORE_KEY_REPEAT
constant GLUT.GLUT_DEVICE_KEY_REPEAT
constant GLUT.GLUT_DISPLAY_MODE_POSSIBLE
constant GLUT.GLUT_DOUBLE
constant GLUT.GLUT_DOWN
constant GLUT.GLUT_ELAPSED_TIME
constant GLUT.GLUT_ENTERED
constant GLUT.GLUT_FULLY_COVERED
constant GLUT.GLUT_FULLY_RETAINED
constant GLUT.GLUT_GAME_MODE_ACTIVE
constant GLUT.GLUT_GAME_MODE_DISPLAY_CHANGED
constant GLUT.GLUT_GAME_MODE_HEIGHT
constant GLUT.GLUT_GAME_MODE_PIXEL_DEPTH
constant GLUT.GLUT_GAME_MODE_POSSIBLE
constant GLUT.GLUT_GAME_MODE_REFRESH_RATE
constant GLUT.GLUT_GAME_MODE_WIDTH
constant GLUT.GLUT_GREEN
constant GLUT.GLUT_HAS_DIAL_AND_BUTTON_BOX
constant GLUT.GLUT_HAS_JOYSTICK
constant GLUT.GLUT_HAS_KEYBOARD
constant GLUT.GLUT_HAS_MOUSE
constant GLUT.GLUT_HAS_OVERLAY
constant GLUT.GLUT_HAS_SPACEBALL
constant GLUT.GLUT_HAS_TABLET
constant GLUT.GLUT_HIDDEN
constant GLUT.GLUT_INDEX
constant GLUT.GLUT_INIT_DISPLAY_MODE
constant GLUT.GLUT_INIT_WINDOW_HEIGHT
constant GLUT.GLUT_INIT_WINDOW_WIDTH
constant GLUT.GLUT_INIT_WINDOW_X
constant GLUT.GLUT_INIT_WINDOW_Y
constant GLUT.GLUT_JOYSTICK_AXES
constant GLUT.GLUT_JOYSTICK_BUTTONS
constant GLUT.GLUT_JOYSTICK_BUTTON_A
constant GLUT.GLUT_JOYSTICK_BUTTON_B
constant GLUT.GLUT_JOYSTICK_BUTTON_C
constant GLUT.GLUT_JOYSTICK_BUTTON_D
constant GLUT.GLUT_JOYSTICK_POLL_RATE
constant GLUT.GLUT_KEY_DOWN
constant GLUT.GLUT_KEY_END
constant GLUT.GLUT_KEY_F1
constant GLUT.GLUT_KEY_F10
constant GLUT.GLUT_KEY_F11
constant GLUT.GLUT_KEY_F12
constant GLUT.GLUT_KEY_F2
constant GLUT.GLUT_KEY_F3
constant GLUT.GLUT_KEY_F4
constant GLUT.GLUT_KEY_F5
constant GLUT.GLUT_KEY_F6
constant GLUT.GLUT_KEY_F7
constant GLUT.GLUT_KEY_F8
constant GLUT.GLUT_KEY_F9
constant GLUT.GLUT_KEY_HOME
constant GLUT.GLUT_KEY_INSERT
constant GLUT.GLUT_KEY_LEFT
constant GLUT.GLUT_KEY_PAGE_DOWN
constant GLUT.GLUT_KEY_PAGE_UP
constant GLUT.GLUT_KEY_REPEAT_DEFAULT
constant GLUT.GLUT_KEY_REPEAT_OFF
constant GLUT.GLUT_KEY_REPEAT_ON
constant GLUT.GLUT_KEY_RIGHT
constant GLUT.GLUT_KEY_UP
constant GLUT.GLUT_LAYER_IN_USE
constant GLUT.GLUT_LEFT
constant GLUT.GLUT_LEFT_BUTTON
constant GLUT.GLUT_LUMINANCE
constant GLUT.GLUT_MENU_IN_USE
constant GLUT.GLUT_MENU_NOT_IN_USE
constant GLUT.GLUT_MENU_NUM_ITEMS
constant GLUT.GLUT_MIDDLE_BUTTON
constant GLUT.GLUT_MULTISAMPLE
constant GLUT.GLUT_NORMAL
constant GLUT.GLUT_NORMAL_DAMAGED
constant GLUT.GLUT_NOT_VISIBLE
constant GLUT.GLUT_NUM_BUTTON_BOX_BUTTONS
constant GLUT.GLUT_NUM_DIALS
constant GLUT.GLUT_NUM_MOUSE_BUTTONS
constant GLUT.GLUT_NUM_SPACEBALL_BUTTONS
constant GLUT.GLUT_NUM_TABLET_BUTTONS
constant GLUT.GLUT_OVERLAY
constant GLUT.GLUT_OVERLAY_DAMAGED
constant GLUT.GLUT_OVERLAY_POSSIBLE
constant GLUT.GLUT_OWNS_JOYSTICK
constant GLUT.GLUT_PARTIALLY_RETAINED
constant GLUT.GLUT_RED
constant GLUT.GLUT_RGB
constant GLUT.GLUT_RGBA
constant GLUT.GLUT_RIGHT_BUTTON
constant GLUT.GLUT_SCREEN_HEIGHT
constant GLUT.GLUT_SCREEN_HEIGHT_MM
constant GLUT.GLUT_SCREEN_WIDTH
constant GLUT.GLUT_SCREEN_WIDTH_MM
constant GLUT.GLUT_SINGLE
constant GLUT.GLUT_STENCIL
constant GLUT.GLUT_STEREO
constant GLUT.GLUT_TRANSPARENT_INDEX
constant GLUT.GLUT_UP
constant GLUT.GLUT_VIDEO_RESIZE_HEIGHT
constant GLUT.GLUT_VIDEO_RESIZE_HEIGHT_DELTA
constant GLUT.GLUT_VIDEO_RESIZE_IN_USE
constant GLUT.GLUT_VIDEO_RESIZE_POSSIBLE
constant GLUT.GLUT_VIDEO_RESIZE_WIDTH
constant GLUT.GLUT_VIDEO_RESIZE_WIDTH_DELTA
constant GLUT.GLUT_VIDEO_RESIZE_X
constant GLUT.GLUT_VIDEO_RESIZE_X_DELTA
constant GLUT.GLUT_VIDEO_RESIZE_Y
constant GLUT.GLUT_VIDEO_RESIZE_Y_DELTA
constant GLUT.GLUT_VISIBLE
constant GLUT.GLUT_WINDOW_ACCUM_ALPHA_SIZE
constant GLUT.GLUT_WINDOW_ACCUM_BLUE_SIZE
constant GLUT.GLUT_WINDOW_ACCUM_GREEN_SIZE
constant GLUT.GLUT_WINDOW_ACCUM_RED_SIZE
constant GLUT.GLUT_WINDOW_ALPHA_SIZE
constant GLUT.GLUT_WINDOW_BLUE_SIZE
constant GLUT.GLUT_WINDOW_BUFFER_SIZE
constant GLUT.GLUT_WINDOW_COLORMAP_SIZE
constant GLUT.GLUT_WINDOW_CURSOR
constant GLUT.GLUT_WINDOW_DEPTH_SIZE
constant GLUT.GLUT_WINDOW_DOUBLEBUFFER
constant GLUT.GLUT_WINDOW_FORMAT_ID
constant GLUT.GLUT_WINDOW_GREEN_SIZE
constant GLUT.GLUT_WINDOW_HEIGHT
constant GLUT.GLUT_WINDOW_NUM_CHILDREN
constant GLUT.GLUT_WINDOW_NUM_SAMPLES
constant GLUT.GLUT_WINDOW_PARENT
constant GLUT.GLUT_WINDOW_RED_SIZE
constant GLUT.GLUT_WINDOW_RGBA
constant GLUT.GLUT_WINDOW_STENCIL_SIZE
constant GLUT.GLUT_WINDOW_STEREO
constant GLUT.GLUT_WINDOW_WIDTH
constant GLUT.GLUT_WINDOW_X
constant GLUT.GLUT_WINDOW_Y
void glutAddMenuEntry(string, int)
void glutAddSubMenu(string, int)
void glutAttachMenu(int)
void glutButtonBoxFunc(function(:void))
void glutChangeToMenuEntry(int, string, int)
void glutChangeToSubMenu(int, string, int)
void glutCopyColormap(int)
int glutCreateMenu(function(:void))
int glutCreateSubWindow(int, int, int, int, int)
int glutCreateWindow(string)
void glutDestroyMenu(int)
void glutDestroyWindow(int)
void glutDetachMenu(int)
int glutDeviceGet(int)
void glutDialsFunc(function(:void))
void glutDisplayFunc(function(:void))
int glutEnterGameMode()
void glutEntryFunc(function(:void))
void glutEstablishOverlay()
int glutExtensionSupported(string)
void glutForceJoystickFunc()
void glutFullScreen()
int glutGameModeGet(int)
void glutGameModeString(string)
int glutGet(int)
float glutGetColor(int, int)
int glutGetMenu()
int glutGetModifiers()
int glutGetWindow()
void glutHideOverlay()
void glutHideWindow()
void glutIconifyWindow()
void glutIdleFunc(function(:void))
void glutIgnoreKeyRepeat(int)
void glutInitDisplayMode(int)
void glutInitDisplayString(string)
void glutInitWindowPosition(int, int)
void glutInitWindowSize(int, int)
void glutJoystickFunc(function(:void), int)
void glutKeyboardFunc(function(:void))
void glutKeyboardUpFunc(function(:void))
int glutLayerGet(int)
void glutLeaveGameMode()
void glutMainLoop()
void glutMenuStateFunc(function(:void))
void glutMenuStatusFunc(function(:void))
void glutMotionFunc(function(:void))
void glutMouseFunc(function(:void))
void glutOverlayDisplayFunc(function(:void))
void glutPassiveMotionFunc(function(:void))
void glutPopWindow()
void glutPositionWindow(int, int)
void glutPostOverlayRedisplay()
void glutPostRedisplay()
void glutPostWindowOverlayRedisplay(int)
void glutPostWindowRedisplay(int)
void glutPushWindow()
void glutRemoveMenuItem(int)
void glutRemoveOverlay()
void glutReportErrors()
void glutReshapeFunc(function(:void))
void glutReshapeWindow(int, int)
void glutSetColor(int, float, float, float)
void glutSetCursor(int)
void glutSetIconTitle(string)
void glutSetKeyRepeat(int)
void glutSetMenu(int)
void glutSetWindow(int)
void glutSetWindowTitle(string)
void glutSetupVideoResizing()
void glutShowOverlay()
void glutShowWindow()
void glutSolidCone(float, float, int, int)
void glutSolidCube(float)
void glutSolidDodecahedron()
void glutSolidIcosahedron()
void glutSolidOctahedron()
void glutSolidSphere(float, int, int)
void glutSolidTeapot(float)
void glutSolidTetrahedron()
void glutSolidTorus(float, float, int, int)
void glutSpaceballButtonFunc(function(:void))
void glutSpaceballMotionFunc(function(:void))
void glutSpaceballRotateFunc(function(:void))
void glutSpecialFunc(function(:void))
void glutSpecialUpFunc(function(:void))
void glutStopVideoResizing()
void glutSwapBuffers()
void glutTabletButtonFunc(function(:void))
void glutTabletMotionFunc(function(:void))
void glutTimerFunc(int, function(:void), int)
void glutUseLayer(int)
void glutVideoPan(int, int, int, int)
void glutVideoResize(int, int, int, int)
int glutVideoResizeGet(int)
void glutVisibilityFunc(function(:void))
void glutWarpPointer(int, int)
void glutWindowStatusFunc(function(:void))
void glutWireCone(float, float, int, int)
void glutWireCube(float)
void glutWireDodecahedron()
void glutWireIcosahedron()
void glutWireOctahedron()
void glutWireSphere(float, int, int)
void glutWireTeapot(float)
void glutWireTetrahedron()
void glutWireTorus(float, float, int, int)