NAME
glGetMaterialfv, glGetMaterialiv
- return material parameters
C SPECIFICATION
void ggllGGeettMMaatteerriiaallffvv(
GLenum _f_a_c_e,
GLenum _p_n_a_m_e,
GLfloat _*_p_a_r_a_m_s )
void ggllGGeettMMaatteerriiaalliivv(
GLenum _f_a_c_e,
GLenum _p_n_a_m_e,
GLint _*_p_a_r_a_m_s )
delim $$
PARAMETERS
-
_f_a_c_e
-
Specifies which of the two materials is being queried.
GGLL__FFRROONNTT or GGLL__BBAACCKK are accepted,
representing the front and back materials, respectively.
-
_p_n_a_m_e
-
Specifies the material parameter to return.
GGLL__AAMMBBIIEENNTT,
GGLL__DDIIFFFFUUSSEE,
GGLL__SSPPEECCUULLAARR,
GGLL__EEMMIISSSSIIOONN,
GGLL__SSHHIINNIINNEESSSS, and
GGLL__CCOOLLOORR__IINNDDEEXXEESS
are accepted.
-
_p_a_r_a_m_s
-
Returns the requested data.
DESCRIPTION
ggllGGeettMMaatteerriiaall returns in _p_a_r_a_m_s the value or values of parameter _p_n_a_m_e
of material _f_a_c_e. Six parameters are defined:
-
GGLL__AAMMBBIIEENNTT
-
_p_a_r_a_m_s returns four integer or floating-point values representing the
ambient reflectance of the material.
Integer values,
when requested,
are linearly mapped from the internal floating-point representation
such that 1.0 maps to the most positive representable integer value,
and -1.0 maps to the most negative representable integer value.
If the internal value is outside the range [-1, 1],
the corresponding integer return value is undefined. The initial value is
(0.2, 0.2, 0.2, 1.0)
-
GGLL__DDIIFFFFUUSSEE
-
_p_a_r_a_m_s returns four integer or floating-point values representing the
diffuse reflectance of the material.
Integer values,
when requested,
are linearly mapped from the internal floating-point representation
such that 1.0 maps to the most positive representable integer value,
and -1.0 maps to the most negative representable integer value.
If the internal value is outside the range [-1, 1],
the corresponding integer return value is undefined. The initial value is
(0.8, 0.8, 0.8, 1.0).
-
GGLL__SSPPEECCUULLAARR
-
_p_a_r_a_m_s returns four integer or floating-point values representing the
specular reflectance of the material.
Integer values,
when requested,
are linearly mapped from the internal floating-point representation
such that 1.0 maps to the most positive representable integer value,
and -1.0 maps to the most negative representable integer value.
If the internal value is outside the range [-1, 1],
the corresponding integer return value is undefined. The initial value is
(0, 0, 0, 1).
-
GGLL__EEMMIISSSSIIOONN
-
_p_a_r_a_m_s returns four integer or floating-point values representing the
emitted light intensity of the material.
Integer values,
when requested,
are linearly mapped from the internal floating-point representation
such that 1.0 maps to the most positive representable integer value,
and -1.0 maps to the most negative representable integer value.
If the internal value is outside the range [-1, 1.0],
the corresponding integer return value is undefined. The initial value is
(0, 0, 0, 1).
-
GGLL__SSHHIINNIINNEESSSS
-
_p_a_r_a_m_s returns one integer or floating-point value representing the
specular exponent of the material.
Integer values,
when requested,
are computed by rounding the internal floating-point value to the
nearest integer value. The initial value is 0.
-
GGLL__CCOOLLOORR__IINNDDEEXXEESS
-
_p_a_r_a_m_s returns three integer or floating-point values representing the
ambient, diffuse, and specular indices of the material.
These indices are used only for color index lighting.
(All the other parameters are used only for RGBA lighting.)
Integer values,
when requested,
are computed by rounding the internal floating-point values to the
nearest integer values.
NOTES
If an error is generated,
no change is made to the contents of _p_a_r_a_m_s.
ERRORS
GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _f_a_c_e or _p_n_a_m_e is not an
accepted value.
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllGGeettMMaatteerriiaall
is executed between the execution of ggllBBeeggiinn
and the corresponding execution of ggllEEnndd.
SEE ALSO
ggllMMaatteerriiaall((33GG))