glSpriteParameterSGIX(3G) OpenGL Reference glSpriteParameterSGIX(3G)
NAME
glSpriteParameterfSGIX, glSpriteParameteriSGIX, glSpriteParameterfvSGIX,
glSpriteParameterivSGIX - set sprite parameters
C SPECIFICATION
void glSpriteParameterfSGIX( GLenum pname,
GLfloat param )
void glSpriteParameteriSGIX( GLenum pname,
GLint param )
PARAMETERS
pname The parameter to be set. Must be GLSPRITEMODESGIX.
param The parameter value. Must be one of GLSPRITEAXIALSGIX or
GLSPRITEOBJECTALIGNEDSGIX or GLSPRITEEYEALIGNEDSGIX.
C SPECIFICATION
void glSpriteParameterfvSGIX( GLenum pname,
const GLfloat *params )
void glSpriteParameterivSGIX( GLenum pname,
const GLint *params )
PARAMETERS
pname
The parameter to be set. Must be one of GLSPRITEMODESGIX or
GLSPRITEAXISSGIX or GLSPRITETRANSLATIONSGIX.
params
Must be a pointer to a scalar (GLSPRITEMODESGIX) or to a three-
valued vector (GLSPRITEAXISSGIX or GLSPRITETRANSLATIONSGIX for
x, y, z, respectively).
DESCRIPTION
glSpriteParameterSGIX is part of the GLSGIXsprite extension. This
extension provides support for geometry that rotates to face the eye, in
the manner of Iris Performer billboards. This is most useful for fast
approximate rendering of objects that have rough spherical or cylindrical
symmetry, such as trees, smoke, and clouds, where the objects are modeled
as simple geometry covered by a complex partially-transparent texture
map.
Sprite geometry is modelled in a canonical frame in which +Z is the up
vector, and -Y is the front vector which is rotated to point to the eye.
Rendering sprite geometry requires applying a transformation to
primitives before applying the current modelview matrix. This
transformation is based on the current modelview matrix, the sprite
Page 1
glSpriteParameterSGIX(3G) OpenGL Reference glSpriteParameterSGIX(3G)
rendering mode, and the constraints on sprite motion.
glSpriteParameterSGIX sets the value of a sprite parameter. pname
specifies the parameter to be changed.
When pname is GLSPRITEMODESGIX, param specifies the sprite rendering
mode. param must be one of the following values:
GLSPRITEAXIALSGIX
The front of the object is rotated about an axis so that it
faces the eye as much as the axis constraint allows.
GLSPRITEOBJECTALIGNEDSGIX
The front of the object is rotated about a point to face the
eye. The remaining rotational degree of freedom is specified by
aligning the top of the object with a specified axis in object
coordinates.
GLSPRITEEYEALIGNEDSGIX
The front of the object is rotated about a point to face the
eye. The remaining rotational degree of freedom is specified by
aligning the top of the object with a specified axis in eye
coordinates.
When pname is either GLSPRITEAXISSGIX or GLSPRITETRANSLATIONSGIX,
params is a pointer to a four-element vector that specifies the sprite
rotation axis or sprite translation, respectively.
The rendering of sprite geometry is enabled with glEnable and disabled
with glDisable using the constant GLSPRITESGIX.
NOTES
When using sprites, the current projection matrix must not include a
rotation.
Be aware that user-defined clipping planes, texture coordinates produced
by certain glTexGen modes, and the current raster position will be
affected by the combined sprite and modelview transformation if they are
specified while GLSPRITESGIX is enabled.
glSpriteParameterSGIX is part of the GLSGIXsprite extension, not part
of the core GL command set. See glIntro for information about using
extensions.
ERRORS
GLINVALIDENUM is generated if pname is not an accepted value.
GLINVALIDENUM is generated if glSpriteParameterfSGIX or
glSpriteParameteriSGIX parameter pname is the GLSPRITEMODESGIX and
parameter param is not one of the accepted values.
Page 2
glSpriteParameterSGIX(3G) OpenGL Reference glSpriteParameterSGIX(3G)
GLINVALIDOPERATION is generated if glSpriteParameterSGIX is executed
between the execution of glBegin and the corresponding execution of
glEnd.
ASSOCIATED GETS
glIsEnabled with argument GLSPRITESGIX
glGet with argument GLSPRITEMODESGIX
glGet with argument GLSPRITEAXISSGIX
glGet with argument GLSPRITETRANSLATIONSGIX
glGetString with argument GLEXTENSIONS
SEE ALSO
Page 3