GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLCOLORMATERIAL

GLCOLORMATERIAL

Index
 

NAME

glColorMaterial - cause a material color to track the current color

 

C SPECIFICATION

void f3glColorMaterialfP( GLenum fIfacefP,
f2facefP
Specifies whether front,
back,
or both front and back material parameters should track the current color.
Accepted values are
%f3GL_FRONTfP,
%f3GL_BACKfP,
and %f3GL_FRONT_AND_BACKfP.
The initial value is %f3GL_FRONT_AND_BACKfP.
f2modefP
Specifies which of several material parameters track the current color. Accepted values are %f3GL_EMISSIONfP, %f3GL_AMBIENTfP, %f3GL_DIFFUSEfP, %f3GL_SPECULARfP, and %f3GL_AMBIENT_AND_DIFFUSEfP. The initial value is %f3GL_AMBIENT_AND_DIFFUSEfP.
 

DESCRIPTION

%f3glColorMaterialfP specifies which material parameters track the current color. When %f3GL_COLOR_MATERIALfP is enabled, the material parameter or parameters specified by f2modefP, of the material or materials specified by f2facefP, track the current color at all times. To enable and disable %f3GL_COLOR_MATERIALfP, call %f3glEnablefP and %f3glDisablefP with argument %f3GL_COLOR_MATERIALfP. %f3GL_COLOR_MATERIALfP is initially disabled.  

NOTES

%f3glColorMaterialfP makes it possible to change a subset of material parameters for each vertex using only the %f3glColorfP command, without calling %f3glMaterialfP. If only such a subset of parameters is to be specified for each vertex, calling %f3glColorMaterialfP is preferable to calling %f3glMaterialfP. Call %f3glColorMaterialfP before enabling %f3GL_COLOR_MATERIALfP. Calling %f3glDrawElementsfP, %f3glDrawArraysfP, or %f3glDrawRangeElementsfP may leave the current color indeterminate, if the color array is enabled. If %f3glColorMaterialfP is enabled while the current color is indeterminate, the lighting material state specified by f2facefP and f2modefP is also indeterminate. If the GL version is 1.1 or greater, and %f3GL_COLOR_MATERIALfP 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.  

ERRORS

%f3GL_INVALID_ENUMfP is generated if f2facefP or f2modefP is not an accepted value. %f3GL_INVALID_OPERATIONfP is generated if %f3glColorMaterialfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glIsEnabledfP with argument %f3GL_COLOR_MATERIALfP
%f3glGetfP with argument %f3GL_COLOR_MATERIAL_PARAMETERfP
%f3glGetfP with argument %f3GL_COLOR_MATERIAL_FACEfP  

SEE ALSO

%f3glColor(3G)fP, %f3glColorPointer(3G)fP, %f3glDrawArrays(3G)fP, %f3glDrawElements(3G)fP, %f3glDrawRangeElements(3G)fP, %f3glEnable(3G)fP, %f3glLight(3G)fP, %f3glLightModel(3G)fP, %f3glMaterial(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
NOTES
ERRORS
ASSOCIATED GETS
SEE ALSO