GLGLOBALALPHAFACTORSUN(3gl)GLGLOBALALPHAFACTORSUN(3gl)NAME
glGlobalAlphaFactorfSUN, glGlobalAlphaFactordSUN, glGlobalAlphaFactorb‐
SUN, glGlobalAlphaFactorsSUN, glGlobalAlphaFactoriSUN, glGlobalAl‐
phaFactorubSUN, glGlobalAlphaFactorusSUN, glGlobalAlphaFactoruiSUN -
set the global alpha factor
C SPECIFICATION
void glGlobalAlphaFactorfSUN( GLfloat factor )
void glGlobalAlphaFactordSUN( GLdouble factor )
void glGlobalAlphaFactorbSUN( GLbyte factor )
void glGlobalAlphaFactorsSUN( GLshort factor )
void glGlobalAlphaFactoriSUN( GLint factor )
void glGlobalAlphaFactorubSUN( GLubyte factor )
void glGlobalAlphaFactorusSUN( GLushort factor )
void glGlobalAlphaFactoruiSUN( GLuint factor )
PARAMETERS
factor Specifies the global alpha value. The initial value is 1.0.
DESCRIPTION
Transparency is done in GL using alpha blending. An alpha value of 0.0
is used for fully transparent objects, while an alpha value of 1.0 is
used for fully opaque objects. A value of 0.25 is 75% transparent, and
so on.
GL defines alpha as a component of the vertex color state. Whenever a
color is set, the alpha component is set along with the red, green, and
blue components. This means that transparency can not be changed for
primitives with per-vertex colors without modifying the color of each
vertex, replacing the old alpha component with the new alpha component.
This can be very expensive for objects that are drawn using vertex
arrays; it all but precludes the use of display lists.
This extension defines a global alpha attribute that can be used to
specify an alpha factor that is independent from the alpha component of
the color value. The global alpha factor is multiplied by the frag‐
ment's alpha value after primitive rasterization and prior to texture
mapping, replacing the fragment's alpha value. The global alpha exten‐
sion is only specified in RGBA mode and must be applied prior to any
texture mapping operation. Also, global alpha is not applied to pixel
rectangles and bitmaps.
If global alpha processing is enabled, then the global alpha factor is
multiplied by the incoming fragment's alpha value. This product
replaces the fragment's alpha value and is passed to subsequent stages
in the pipeline.
NOTES
For geometric primitives, a functionally equivalent method to that of
performing a multiplication for each fragment is to multiply the alpha
values at each vertex of the primitive by the global alpha factor prior
to the primitive rasterization step.
glGlobalAlphaFactor*SUN is part of the GL_SUN_global_alpha extension,
not part of the core GL command set. If GL_SUN_global_alpha is
included in the string returned by glGetString, when called with argu‐
ment GL_EXTENSIONS, extension glGlobalAlphaFactor*SUN is supported by
the connection.
ASSOCIATED GETS
glGet with arguments GL_GLOBAL_ALPHA_SUN or GL_GLOBAL_ALPHA_FACTOR_SUN
SEE ALSO
glEnable, glDisable, glIsEnabled, glGetString
13 Apr 99 GLGLOBALALPHAFACTORSUN(3gl)