File: getmaterial.3gl

package info (click to toggle)
vnc4 4.1.1%2BX4.3.0-37
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 171,636 kB
  • ctags: 288,245
  • sloc: ansic: 2,205,268; cpp: 56,345; sh: 38,092; pascal: 13,773; asm: 12,656; tcl: 9,182; lisp: 7,831; perl: 3,364; makefile: 2,957; yacc: 2,902; objc: 2,698; xml: 2,614; python: 2,383; lex: 1,477; awk: 901; csh: 58; sed: 50
file content (133 lines) | stat: -rw-r--r-- 4,365 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
'\" e
'\"! eqn | mmdoc
'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 getmateri
.ds Xs 34280 6 getmaterial.gl
.TH GLGETMATERIAL 3G
.SH NAME
.B "glGetMaterialfv, glGetMaterialiv
\- return material parameters

.SH C SPECIFICATION
void \f3glGetMaterialfv\fP(
GLenum \fIface\fP,
.nf
.ta \w'\f3void \fPglGetMaterialfv( 'u
	GLenum \fIpname\fP,
	GLfloat \fI*params\fP )
.fi
void \f3glGetMaterialiv\fP(
GLenum \fIface\fP,
.nf
.ta \w'\f3void \fPglGetMaterialiv( 'u
	GLenum \fIpname\fP,
	GLint \fI*params\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIparams\fP\ \ 'u 
\f2face\fP
Specifies which of the two materials is being queried.
\%\f3GL_FRONT\fP or \%\f3GL_BACK\fP are accepted,
representing the front and back materials, respectively.
.TP
\f2pname\fP
Specifies the material parameter to return.
\%\f3GL_AMBIENT\fP,
\%\f3GL_DIFFUSE\fP,
\%\f3GL_SPECULAR\fP,
\%\f3GL_EMISSION\fP, 
\%\f3GL_SHININESS\fP, and
\%\f3GL_COLOR_INDEXES\fP
are accepted.
.TP
\f2params\fP
Returns the requested data.
.SH DESCRIPTION
\%\f3glGetMaterial\fP returns in \f2params\fP the value or values of parameter \f2pname\fP
of material \f2face\fP. Six parameters are defined:
.TP 22
\%\f3GL_AMBIENT\fP
\f2params\fP 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)
.TP
\%\f3GL_DIFFUSE\fP
\f2params\fP 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).
.TP
\%\f3GL_SPECULAR\fP
\f2params\fP 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).
.TP
\%\f3GL_EMISSION\fP
\f2params\fP 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). 
.TP
\%\f3GL_SHININESS\fP
\f2params\fP 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. 
.TP
\%\f3GL_COLOR_INDEXES\fP
\f2params\fP 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.
.SH NOTES
If an error is generated,
no change is made to the contents of \f2params\fP.
.SH ERRORS
\%\f3GL_INVALID_ENUM\fP is generated if \f2face\fP or \f2pname\fP is not an
accepted value.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glGetMaterial\fP
is executed between the execution of \%\f3glBegin\fP
and the corresponding execution of \%\f3glEnd\fP.
.SH SEE ALSO
\%\f3glMaterial(3G)\fP