Home | History | Annotate | Download | only in docs

Lines Matching full:style

8 <span style="font-style: italic;"></span><span
9 style="font-weight: bold;"></span>
10 <h1 style="text-align: center;">Mesa Subset Specification</h1>
11 <h2 style="text-align: center;">Tungsten Graphics, Inc.</h2>
12 <h2 style="text-align: center;">February 26, 2003</h2>
60 <p>Mesa function names are printed in <span style="font-weight: bold;">bold
62 style="font-style: italic;">italics</span>.<br>
65 referred to as <span style="font-style: italic;">the subset.</span><br>
72 &nbsp;Primitives are drawn with the <span style="font-weight: bold;">glBegin</span>
73 and <span style="font-weight: bold;">glEnd</span> commands and a subset
74 of the <span style="font-weight: bold;">glVertex</span> commands:<br>
76 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glBegin</span>(GLenum<span
77 style="font-style: italic;">mode</span>)<br>
78 void <span style="font-weight: bold;">glEnd</span>(void)<br>
80 void <span style="font-weight: bold;">glVertex2f</span>(GLfloat <span
81 style="font-style: italic;">x</span>, GLfloat <span
82 style="font-style: italic;">y</span>)<br>
83 void <span style="font-weight: bold;">glVertex2fv</span>(const GLfloat
84 *<span style="font-style: italic;">v</span>)<br>
85 void <span style="font-weight: bold;">glVertex3f</span>(GLfloat <span
86 style="font-style: italic;">x</span>, GLfloat <span
87 style="font-style: italic;">y</span>, GLfloat <span
88 style="font-style: italic;">z</span>)<br>
89 void <span style="font-weight: bold;">glVertex3fv</span>(const GLfloat
90 *<span style="font-style: italic;">v</span>)<br>
93 The <span style="font-style: italic;">mode</span> parameter to <span
94 style="font-weight: bold;">glBegin</span> may be one of the following<br>
96 <div style="margin-left: 40px;">GL_POINTS - a series of individual
110 The <span style="font-weight: bold;">glVertex</span> commands take two
114 subset's <span style="font-weight: bold;">glVertex</span> commands, is
117 <span style="font-weight: bold;"></span>
120 The <span style="font-weight: bold;">glColor</span> and <span
121 style="font-weight: bold;">glTexCoord</span> commands may be used to
124 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glColor3f</span>(GLfloat<span
125 style="font-style: italic;">red</span>, GLfloat <span
126 style="font-style: italic;">green</span>, GLfloat <span
127 style="font-style: italic;">blue</span>)<br>
128 void <span style="font-weight: bold;">glColor3fv</span>(const GLfloat *<span
129 style="font-style: italic;">rgb</span>)<br>
130 void <span style="font-weight: bold;">glColor4f</span>(GLfloat <span
131 style="font-style: italic;">red,</span> GLfloat <span
132 style="font-style: italic;">green,</span> GLfloat <span
133 style="font-style: italic;">blue,</span> GLfloat <span
134 style="font-style: italic;">alpha</span>)<br>
135 void <span style="font-weight: bold;">glColor4fv</span>(const GLfloat *<span
136 style="font-style: italic;">rgba</span>)<br>
137 void <span style="font-weight: bold;">glTexCoord2f</span>(GLfloat <span
138 style="font-style: italic;">s</span>, GLfloat<span
139 style="font-style: italic;"> t</span>)<br>
140 void <span style="font-weight: bold;">glTexCoord2fv</span>(const
141 GLfloat *<span style="font-style: italic;">c</span>)<br>
144 The <span style="font-weight: bold;">glColor</span> commands specify
146 &nbsp;For the <span style="font-weight: bold;">glColor3</span> commands,
149 The <span style="font-weight: bold;">glTexCoord2</span> commands
152 &nbsp;The <span style="font-weight: bold;">glTexCoord2</span> commands
156 <span style="font-weight: bold;"></span>Only <span
157 style="font-weight: bold;">glVertex, glColor</span> and <span
158 style="font-weight: bold;">glTexCoord</span> commands are allowed
159 between <span style="font-weight: bold;">glBegin</span> and <span
160 style="font-weight: bold;">glEnd.</span> &nbsp;Calling any other
161 command between <span style="font-weight: bold;">glBegin</span> and <span
162 style="font-weight: bold;">glEnd</span> will result in the error
169 <div style="margin-left: 40px;">Per-Vertex commands:<br>
171 <div style="margin-left: 40px;">
172 <div style="margin-left: 40px;"><span style="font-weight: bold;">glVertex2d,
178 style="font-weight: bold;">glNormal3bv, glNormal3dv, glNormal3fv,
183 glColor3us, </span><span style="font-weight: bold;">glColor3bv,
185 glColor3usv,</span><span style="font-weight: bold;"> lColor4b,
187 style="font-weight: bold;">glColor4bv, glColor4dv, glColor4iv,
189 </span><span style="font-weight: bold;">glTexCoord1d, glTexCoord1f,
197 glEdgeFlag, glEdgeFlagv</span><br style="font-weight: bold;">
201 <div style="margin-left: 40px;"><span style="font-weight: bold;">glVertexPointer,
208 <div style="margin-left: 40px;"><br>
210 <div style="margin-left: 40px;"><span style="font-weight: bold;">glRects,
215 <div style="margin-left: 40px;">Lighting commands:<br>
217 <div style="margin-left: 80px;"><span style="font-weight: bold;">glMaterialf,
221 <div style="margin-left: 40px;"> Evaluator commands:<br>
222 <div style="margin-left: 40px;"><span style="font-weight: bold;">glEvalCoord1d,
224 style="font-weight: bold;">glEvalCoord2d, glEvalCoord2f,
226 </span><span style="font-weight: bold;">glEvalPoint1, glEvalPoint2</span><br>
237 <div style="margin-left: 40px; font-weight: bold;">glMatrixMode<span
238 style="font-weight: normal;">(GLenum <span style="font-style: italic;">mode</span>)</span><br>
239 glLoadIdentity<span style="font-weight: normal;">(void)</span><br>
240 glPushMatrix<span style="font-weight: normal;">(void)</span><br>
241 glPopMatrix<span style="font-weight: normal;">(void)</span><br>
242 glLoadMatrixf<span style="font-weight: normal;">(const GLfloat *<span
243 style="font-style: italic;">m</span>)</span><br>
244 glMultMatrixf<span style="font-weight: normal;">(const GLfloat *<span
245 style="font-style: italic;">m</span>)</span><br>
246 glRotatef<span style="font-weight: normal;">(GLfloat <span
247 style="font-style: italic;">angle</span>, GLfloat <span
248 style="font-style: italic;">x</span>, GLfloat <span
249 style="font-style: italic;">y</span>, GLfloat <span
250 style="font-style: italic;">z</span>)</span><br>
251 glTranslatef<span style="font-weight: normal;">(GLfloat <span
252 style="font-style: italic;">x</span>, GLfloat <span
253 style="font-style: italic;">y</span>, GLfloat <span
254 style="font-style: italic;">z</span>)</span><br>
255 glScalef<span style="font-weight: normal;">(GLfloat <span
256 style="font-style: italic;">x</span>, GLfloat <span
257 style="font-style: italic;">y</span>, GLfloat <span
258 style="font-style: italic;">z</span>)<br>
259 <span style="font-weight: bold;">glFrustum(</span>GLdouble <span
260 style="font-style: italic;">left,</span> GLdouble <span
261 style="font-style: italic;">right,</span> GLdouble <span
262 style="font-style: italic;">bottom,</span> GLdouble <span
263 style="font-style: italic;">top,</span> GLdouble <span
264 style="font-style: italic;">near,</span> GLdouble <span
265 style="font-style: italic;">far</span>)</span><br>
266 <span style="font-weight: normal;"><span style="font-weight: bold;">glOrtho(</span>GLdouble<span
267 style="font-style: italic;"> left,</span> GLdouble <span
268 style="font-style: italic;">right,</span> GLdouble <span
269 style="font-style: italic;">bottom,</span> GLdouble <span
270 style="font-style: italic;">top,</span> GLdouble <span
271 style="font-style: italic;">near,</span> GLdouble <span
272 style="font-style: italic;">far</span>)</span><br>
273 glViewport<span style="font-weight: normal;">(GLint <span
274 style="font-style: italic;">x</span>, GLint <span
275 style="font-style: italic;">y</span>, GLsize <span
276 style="font-style: italic;">width,</span> GLsizei <span
277 style="font-style: italic;">height</span>)</span><br>
280 The <span style="font-weight: bold;">glMatrixMode</span> command
281 specifies the <span style="font-style: italic;">current matrix.</span>
288 The <span style="font-weight: bold;">glLoadIdentity</span> command
292 The <span style="font-weight: bold;">glPushMatrix</span> command pushes
294 the projection matrix stack. &nbsp;The <span style="font-weight: bold;">glPopMatrix</span>
300 The <span style="font-weight: bold;">glMultMatrixf</span> command
304 The <span style="font-weight: bold;">glRotatef</span> command
308 The <span style="font-weight: bold;">glTranslatef</span> command
310 the <span style="font-style: italic;">x</span>, <span
311 style="font-style: italic;">y</span> and <span
312 style="font-style: italic;">z</span> translation parameters.<br>
313 <span style="font-weight: bold;"></span><br>
314 The <span style="font-weight: bold;">glScalef</span> command
316 style="font-style: italic;">x</span>, <span
317 style="font-style: italic;">y</span> and <span
318 style="font-style: italic;">z</span> scale factors.<br>
319 <span style="font-weight: bold;"></span><br>
320 The <span style="font-weight: bold;">glFrustum</span> command
322 &nbsp;The <span style="font-style: italic;">near</span> and <span
323 style="font-style: italic;">far</span> values specify the position of
325 style="font-style: italic;">left, right, bottom</span> and <span
326 style="font-style: italic;">top</span> parameters are the X and Y
328 style="font-weight: bold;">glFrustum</span> is normally used to modify
331 The <span style="font-weight: bold;">glOrtho</span> command
333 &nbsp;The <span style="font-style: italic;">near</span> and <span
334 style="font-style: italic;">far</span> values specify the position of
336 style="font-style
337 style="font-style: italic;">top</span> parameters specify the X and
338 Y-axis clipping planes. &nbsp;<span style="font-weight: bold;">glOrtho</span>
341 The <span style="font-weight: bold;">glViewport</span> command
343 to window coordinates. &nbsp;The <span style="font-style: italic;">x</span>
344 and <span style="font-style: italic;">y</span> parameters specify the
346 style="font-style: italic;">width</span> and <span
347 style="font-style: italic;">height</span> parameters specify the size
348 of the viewport. &nbsp;<span style="font-weight: bold;">glViewport</span>
357 style="font-weight: bold;">glFrustum</span> and <span
358 style="font-weight: bold;">glOrtho</span>. &nbsp;Note that the <span
359 style="font-weight: bold;">glViewport</span> command does not define a
362 Clipping occurs in <span style="font-style: italic;">clip coordinate
368 with <span style="font-weight: bold;">glBitmap.</span> &nbsp;The current
371 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glRasterPos2f</span>(GLfloat<span
372 style="font-style: italic;">x</span>, GLfloat <span
373 style="font-style: italic;">y</span>)<br>
374 void <span style="font-weight: bold;">glRasterPos2fv</span>(const
375 GLfloat *<span style="font-style: italic;">v</span>)<br>
376 void <span style="font-weight: bold;">glRasterPos2i</span>(GLint <span
377 style="font-style: italic;">x</span>, GLint <span
378 style="font-style: italic;">y</span>)<br>
379 void <span style="font-weight: bold;">glRasterPos2iv</span>(const
380 GLint *<span style="font-style: italic;">v</span>)<br>
383 <span style="font-weight: bold;">glRasterPos</span> specifies a
390 and subsequent <span style="font-weight: bold;">glBitmap</span> commands
393 <span style="font-weight: bold;">glRasterPos</span> also updates the
396 specified by <span style="font-weight: bold;">glColor</span>).
399 style="font-weight: bold;">glTexCoord</span>).<br>
405 <div style="margin-left: 40px;">User-defined clip plane commands:<br>
406 <div style="margin-left: 40px;"><span style="font-weight: bold;">glClipPlane</span><br>
408 <span style="font-weight: bold;"></span></div>
410 <div style="margin-left: 40px;">Lighting and material commands:</div>
411 <div style="margin-left: 80px;"><span style="font-weight: bold;">glLightModeli,
412 glLightModelf,&nbsp;</span><span style="font-weight: bold;">glLightModeliv,
413 glLightModelfv,</span><span style="font-weight: bold;"> glLightf,
417 <div style="margin-left: 40px;">Automatic texture coordinate generation
420 <div style="margin-left: 40px;">
421 <div style="margin-left: 40px;"><span style="font-weight: bold;">glTexGend,
422 glTexGenf, glTexGeni, </span><span style="font-weight: bold;">glTexGendv,
424 <br style="font-weight: bold;">
427 <div style="margin-left: 40px;"><span style="font-weight: bold;">glLoadMatrixd,
429 style="font-weight: bold;">
433 <div style="margin-left: 40px;"><span style="font-weight: bold;">glDepthRange</span>
438 <div style="margin-left: 40px;"><span style="font-weight: bold;">glRasterPos2d,
450 lines, triangles and bitmaps. &nbsp;<span style="font-style: italic;">Rasterization</span>
455 to <span style="font-style: italic;">draw</span> the line. &nbsp;A
462 style="font-weight: bold;">glBegin</span>(GL_POINTS), <span
463 style="font-weight: bold;">glVertex</span>, ... <span
464 style="font-weight: bold;">glEnd</span>. &nbsp;The window coordinate (x<sub>w</sub>,
470 The <span style="font-weight: bold;">glPointSize</span> command is not
477 style="font-weight: bold;">glBegin</span>(<span
478 style="font-style: italic;">mode</span>), <span
479 style="font-weight: bold;">glVertex</span>, <span
480 style="font-weight: bold;">glVertex</span>, ... <span
481 style="font-weight: bold;">glEnd</span> where <span
482 style="font-style: italic;">mode</span> is one of GL_LINES,
485 style="font-style: italic;">half-open</span> convention for drawing
493 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glLineWidth</span>(GLfloat<span
494 style="font-style: italic;">width</span>)<br>
497 where <span style="font-style: italic;">width</span> is the line width
506 <div style="margin-left: 40px;"><span style="font-weight: bold;">glLineStipple</span>(GLint<span
507 style="font-style: italic;">factor</span>, GLushort <span
508 style="font-style: italic;">pattern</span>)<br>
511 <span style="font-style: italic;">pattern</span> describes an on/off
513 style="font-style: italic;">factor</span> specifies how many subsequent
516 style="font-weight: bold;">glEnable</span>(GL_LINE_STIPPLE) and <span
517 style="font-weight: bold;">glDisable</span>(GL_LINE_STIPPLE).<br>
522 style="font-style: italic;">coverage value</span> which describes how
524 style="font-style: italic;">inside</span> the line. &nbsp;Later, the
530 style="font-weight: bold;">glEnable</span>(GL_LINE_SMOOTH) and <span
531 style="font-weight: bold;">glDisable</span>(GL_LINE_SMOOTH).<br>
538 style="font-weight: bold;">glBegin</span><span
539 style="font-style: italic;"><span style="font-style: italic;">(mode</span></span>),<span
540 style="font-weight: bold;">glVertex</span>, <span
541 style="font-weight: bold;">glVertex</span>, ... <span
542 style="font-weight: bold;">glEnd</span> where <span
543 style="font-style: italic;">mode</span> may be one of GL_TRIANGLES,
544 GL_TRIANGLE_STRIP or GL_TRIANGLE_FAN.<span style="font-weight: bold;"></span>
550 Quadrilaterals are <span style="font-weight: bold;"></span>rendered by
551 the command sequence <span style="font-weight: bold;">glBegin</span>(<span
552 style="font-style: italic;"><span style="font-style: italic;">mode</span></span>),<span
553 style="font-weight: bold;">glVertex</span>, <span
554 style="font-weight: bold;">glVertex</span>, ... <span
555 style="font-weight: bold;">glEnd</span> where <span
556 style="font-style: italic;">mode</span> may be one of GL_QUADS or
557 GL_QUAD_STRIP.<span style="font-weight: bold;"></span> &nbsp; For
563 Convex polygons are <span style="font-weight: bold;"></span>rendered
564 by the command sequence <span style="font-weight: bold;">glBegin</span><span
565 style="font-style: italic;"><span style="font-style: italic;"></span></span>(GL_POLYGON),<span
566 style="font-weight: bold;">glVertex</span>, <span
567 style="font-weight: bold;">glVertex</span>, ... <span
568 style="font-weight: bold;">glEnd</span>.<span
569 style="font-style: italic;"></span><span style="font-weight: bold;"></span>
573 The <span style="font-style: italic;">winding order</span> of vertices
575 determine the <span style="font-style: italic;">front-facing</span> or <span
576 style="font-style: italic;">back-facing</span> orientation of polygons.
584 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glFrontFace</span>(GLenum<span
585 style="font-style: italic;"> mode</span>)<br>
589 front-facing polygon. &nbsp;If <span style="font-style: italic;">mode</span>
591 style="font-style: italic;">mode</span> is GL_CCW then polygons with
593 GL_CCW. &nbsp;If <span style="font-style: italic;">mode</span> is not
595 style="font-style: italic;"></span><span style="font-style: italic;"></span><br>
601 <div style="margin-left: 40px;">void<span style="font-weight: bold;">
602 glCullFace</span>(GLenum <span style="font-style: italic;">mode</span>)<br>
606 culled. &nbsp;If <span style="font-style: italic;">mode</span> is
608 style="font-style: italic;">mode</span> is GL_BACK then back-facing
609 polygons will be culled. Otherwise, if <span style="font-style: italic;">mode</span>
611 value for <span style="font-style: italic;">mode</span> will raise the
615 style="font-weight: bold;">glEnable</span>(GL_CULL_FACE) and <span
616 style="font-weight: bold;">glDisable</span>(GL_CULL_FACE),
622 style="font-weight: bold;">glEnable</span>(GL_POLYGON_SMOOTH) and <span
623 style="font-weight: bold;">glDisable</span>(GL_POLYGON_SMOOTH).<br>
627 style="font-style: italic;">coverage</span> value which indicates how
641 <div style="margin-left: 40px;"> void <span style="font-weight: bold;">glShadeModel</span>(GLenum<span
642 style="font-style: italic;">mode</span>)<br>
646 rasterization. &nbsp;If <span style="font-style: italic;">mode</span> is
651 style="font-style: italic;">mode</span> is GL_SMOOTH then vertex colors
662 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glBitmap</span>(GLsizei<span
663 style="font-style: italic;">width</span>, GLsizei <span
664 style="font-style
665 style="font-style: italic;">xOrig</span>, GLfloat <span
666 style="font-style: italic;">yOrig</span>, GLfloat <span
667 style="font-style: italic;">xMove</span>, GLfloat <span
668 style="font-style: italic;">yMove</span>, const &nbsp;GLubyte *<span
669 style="font-style: italic;">image</span>)<br>
672 <span style="font-style: italic;">width </span>and <span
673 style="font-style: italic;">height</span> specify the image size in
674 pixels. &nbsp;<span style="font-style: italic;">xOrig</span> and <span
675 style="font-style: italic;">yOrig</span> specify the bitmap origin.
676 &nbsp;<span style="font-style: italic;">xMove</span> and <span
677 style="font-style: italic;">yMove</span> are added to the current
679 style="font-style: italic;">image</span> is a pointer to the bitmap
683 style="font-weight: bold;">glBitmap</span> has no effect.<br>
686 The first step in bitmap rendering is <span style="font-style: italic;">unpacking.
691 <div style="margin-left: 40px;">void<span style="font-weight: bold;">
694 <span style="font-style: italic;"></span><br>
698 style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
701 <td style="vertical-align: top;">Parameter (<span
702 style="font-style: italic;">pname</span>)<br>
704 <td style="vertical-align: top;">Value (<span
705 style="font-style: italic;">value</span>)<br>
707 <td style="vertical-align: top;">Default<br>
711 <td style="vertical-align: top;">GL_UNPACK_ROW_LENGTH<br>
713 <td style="vertical-align: top;">Width of the image in memory, in
716 <td style="vertical-align: top;">0<br>
720 <td style="vertical-align: top;">GL_UNPACK_LSB_FIRST<br>
722 <td style="vertical-align: top;">GL_FALSE indicates that the most
727 <td style="vertical-align: top;">GL_FALSE<br>
736 style="font-style: italic;">width</span> parameter to <span
737 style="font-weight: bold;">glBitmap</span> specifies the width of the
747 <div style="margin-left: 40px;">rowLength = (GL_UNPACK_ROW_LENGTH != 0)
748 ? GL_UNPACK_ROW_LENGTH : <span style="font-style: italic;">width</span>;<br>
750 byte = <span style="font-style: italic;">image</span>[((rowLength + 7)
764 <span style="font-style: italic;"><span style="font-style: italic;"></span></span>
770 for (j = 0; j &lt; <span style="font-style: italic;">height</span>;
772 &nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">width</span>;
776 floor(x<sub>rp</sub> - <span style="font-style: italic;">xOrig</span>)
779 floor(y<sub>rp</sub> - <span style="font-style: italic;">yOrig</span>)
794 <div style="margin-left: 40px;">x<sub>rp</sub> = x<sub>rp</sub> + <span
795 style="font-style: italic;">xMove</span><br>
796 y<sub>rp</sub> = y<sub>rp</sub> + <span style="font-style: italic;">yMove</span><br>
806 <div style="margin-left: 40px;">Point commands:<br>
807 <div style="margin-left: 40px;"><span style="font-weight: bold;">glPointSize</span><br>
811 <div style="margin-left: 40px; font-weight: bold;">glPolygonStipple<br>
817 <div style="margin-left: 40px;">Pixel storage commands:<br>
819 <div style="font-weight: bold; margin-left: 80px;">glPixelStoref<br>
830 style="font-weight: bold;">glEnable</span>(GL_TEXTURE_2D) and <span
831 style="font-weight: bold;">glDisable</span>(GL_TEXTURE_2D).<br>
836 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glTexImage2D</span>(GLenum<span
837 style="font-style: italic;"> target</span>, GLint <span
838 style="font-style: italic;">level</span>, GLint <span
839 style="font-style: italic;">internalFormat,</span> GLsizei <span
840 style="font-style: italic;">width,</span> GLsizei <span
841 style="font-style: italic;">height,</span> GLint <span
842 style="font-style: italic;">border,</span> GLenum <span
843 style="font-style: italic;">format,</span> GLenum <span
844 style="font-style: italic;">type,</span> const GLvoid *<span
845 style="font-style: italic;">pixels</span> )<br>
848 <span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
849 &nbsp;<span style="font-style: italic;">level </span>indicates the
850 mipmap level for mipmap textures. &nbsp;<span style="font-style: italic;">internalFormat</span>
852 texture. &nbsp;<span style="font-style: italic;">width</span> and <span
853 style="font-style: italic;">height </span>indicate the image size in
854 pixels (or texels). &nbsp;<span style="font-style: italic;">border </span>must
855 be zero. &nbsp;<span style="font-style: italic;">format</span> and <span
856 style="font-style: italic;">type</span> describe the pixel format and
857 data type for the incoming image. &nbsp;<span style="font-style: italic;">pixels</span>
862 <h3><span style="font-style: italic;"></span></h3>
865 must be the case that <span style="font-style: italic;">width </span>=
866 2<sup>n</sup> and <span style="font-style: italic;">height</span> = 2<sup>m</sup>
872 base image (<span style="font-style: italic;">level</span>=0) is of
881 style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
884 <td style="vertical-align: top;">mipmap level<br>
886 <td style="vertical-align: top;">width<br>
888 <td style="vertical-align: top;">height<br>
892 <td style="vertical-align: top;">0<br>
894 <td style="vertical-align: top;">256<br>
896 <td style="vertical-align: top;">64<br>
900 <td style="vertical-align: top;">1<br>
902 <td style="vertical-align: top;">128<br>
904 <td style="vertical-align: top;">32<br>
908 <td style="vertical-align: top;">2<br>
910 <td style="vertical-align: top;">64<br>
912 <td style="vertical-align: top;">16<br>
916 <td style="vertical-align: top;">3<br>
918 <td style="vertical-align: top;">32<br>
920 <td style="vertical-align: top;">8<br>
924 <td style="vertical-align: top;">4<br>
926 <td style="vertical-align: top;">16<br>
928 <td style="vertical-align: top;">4<br>
932 <td style="vertical-align: top;">5<br>
934 <td style="vertical-align: top;">8<br>
936 <td style="vertical-align: top;">2<br>
940 <td style="vertical-align: top;">6<br>
942 <td style="vertical-align: top;">4<br>
944 <td style="vertical-align: top;">1<br>
948 <td style="vertical-align: top;">7<br>
950 <td style="vertical-align: top;">2<br>
952 <td style="vertical-align: top;">1<br>
956 <td style="vertical-align: top;">8<br>
958 <td style="vertical-align: top;">1<br>
960 <td style="vertical-align: top;">1<br>
966 If the <span style="font-style: italic;">width</span> or <span
967 style="font-style: italic;">height</span> parameters are not powers of
970 considered to be <span style="font-style: italic;">inconsistent</span>
974 The <span style="font-weight: bold;">glTexImage2D</span> command's <span
975 style="font-style: italic;"><span style="font-weight: bold;"></span></span><span
976 style="font-style: italic;">format</span> and <span
977 style="font-style: italic;">type</span> parameters describe the format
979 style="font-style: italic;">format</span> are GL_INTENSITY, GL_RGB and
980 GL_RGBA. &nbsp;The <span style="font-style: italic;">type</span>
984 If <span style="font-style: italic;">format</span> is GL_INTENSITY then
986 blue and alpha values.<span style="font-style: italic;"></span><br>
988 If <span style="font-style: italic;">format</span> is GL_RGB then the
992 If <span style="font-style: italic;">format</span> is GL_RGBA then the
998 <div style="margin-left: 40px;">void<span style="font-weight: bold;">
999 glPixelStorei</span>(GLenum <span style="font-style: italic;">pname</span>,
1000 GLint <span style="font-style: italic;">value</span>)<br>
1004 style="font-style: italic;">pname</span> may be GL_UNPACK_ROW_LENGTH to
1007 the <span style="font-style: italic;">width</span> parameter to <span
1008 style="font-weight: bold;">glTexImage2D </span>determines the stride.<span
1009 style="font-style: italic;"></span><br>
1012 <span style="font-weight: bold;">glTexImage2D<span
1013 style="font-style: italic;"> </span></span>converts the incoming
1016 The <span style="font-style: italic;">internalFormat</span> parameter
1020 If <span style="font-style: italic;">internalFormat</span> is
1025 If <span style="font-style: italic;">internalFormat</span> is GL_RGB5
1029 If <span style="font-style: italic;">internalFormat </span>is
1039 with the <span style="font-weight: bold;">glTexCoord</span> commands.
1047 style="font-style: italic;">texture wrap mode</span>. &nbsp;The
1050 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glTexParameteri</span>(GLenum<span
1051 style="font-style: italic;"> target</span>, GLenum <span
1052 style="font-style: italic;">pname</span>, GLint <span
1053 style="font-style: italic;">value</span>)<br>
1056 <span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
1057 &nbsp;If <span style="font-style: italic;">pname</span> is
1059 style="font-style: italic;">value</span> must be either
1075 style="font-style: italic;">level of detail</span> value (lambda) is
1081 then the texture <span style="font-style: italic;">minification</span>
1084 style="font-style: italic;">magnification</span> filter will be used.<br>
1085 <span style="font-weight: bold;"></span><span
1086 style="font-style: italic;"></span><br>
1089 style="font-weight: bold;">glTexParameteri </span><span
1090 style="font-style: italic;"></span><span style="font-weight: bold;"></span><span
1091 style="font-style: italic;"></span> command by setting <span
1092 style="font-style: italic;">target</span> to GL_TEXTURE_2D, setting <span
1093 style="font-style: italic;">pname</span> to GL_TEXTURE_MIN_FILTER and
1094 setting <span style="font-style: italic;">value</span> to GL_NEAREST,
1136 style="font-weight: bold;">glTexParameteri </span><span
1137 style="font-style: italic;"></span><span style="font-weight: bold;"></span>command
1138 by setting <span style="font-style: italic;">target</span> to
1139 GL_TEXTURE_2D, setting <span style="font-style: italic;">pname</span> to
1140 GL_TEXTURE_MAG_FILTER and setting <span style="font-style: italic;">value</span>
1157 <div style="margin-left: 40px;">void<span style="font-weight: bold;">
1158 glTexEnvi</span>(GLenum <span style="font-style: italic;">target</span>,
1159 GLenum <span style="font-style: italic;">pname</span>, GLint <span
1160 style="font-style: italic;">value</span>)<br>
1163 <span style="font-style: italic;">target</span> must be GL_TEXTURE_ENV.
1164 &nbsp;If <span style="font-style: italic;">pname</span> is
1165 GL_TEXTURE_ENV_MODE then <span style="font-style: italic;">value</span>
1168 There is also a <span style="font-style: italic;">texture environment
1172 <div style="margin-left: 40px;">void<span style="font-weight: bold;">
1173 glTexEnvfv</span>(GLenum <span style="font-style: italic;">target</span>,
1174 GLenum <span style="font-style: italic;">pname</span>, const GLfloat *<span
1175 style="font-style: italic;">value</span>)<br>
1177 <span style="font-style: italic;"></span><br>
1178 <span style="font-style: italic;">target</span> must be GL_TEXTURE_ENV.
1179 &nbsp;If <span style="font-style: italic;">pname</span> is
1180 GL_TEXTURE_ENV_COLOR then <span style="font-style: italic;">value </span>must
1184 <span style="font-style: italic;"></span><br>
1189 style="font-style: italic;"></span>'It' is the sampled texture
1195 style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
1198 <td style="vertical-align: top;">Base Internal Format<br>
1200 <td style="vertical-align: top;">GL_REPLACE<br>
1202 <td style="vertical-align: top;">GL_MODULATE<br>
1204 <td style="vertical-align: top;">GL_DECAL<br>
1206 <td style="vertical-align: top;">GL_BLEND<br>
1210 <td style="vertical-align: top;">GL_INTENSITY<br>
1212 <td style="vertical-align: top;">Rv = It<br>
1217 <td style="vertical-align: top;">Rv = Rf * It<br>
1221 <td style="vertical-align: top;">undefined<br>
1223 <td style="vertical-align: top;">Rv = Rf*(1-It) + Rc*It<br>
1229 <td style="vertical-align: top;">GL_RGB<br>
1231 <td style="vertical-align: top;">Rv = Rt<br>
1236 <td style="vertical-align: top;">Rv = Rf * Rt<br>
1241 <td style="vertical-align: top;">Rv = Rt<br>
1245 <td style="vertical-align: top;">Rv = Rf*(1-Rt) + Rc*Rt<br>
1251 <td style="vertical-align: top;">GL_RGBA<br>
1253 <td style="vertical-align: top;">Rv = Rt<br>
1258 <td style="vertical-align: top;">Rv = Rf * Rt<br>
1262 <td style="vertical-align: top;">Rv = Rf*(1-At) + Rt*At<br>
1267 <td style="vertical-align: top;">Rv = Rf*(1-Rt) + Rc*Rt<br>
1288 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glBindTexture</span>(GLenum<span
1289 style="font-style: italic;"> target</span>, GLuint <span
1290 style="font-style: italic;">textureID</span>)<br>
1293 <span style="font-style: italic;">target</span> must be GL_TEXTURE_2D.
1294 &nbsp;<span style="font-style: italic;">textureID</span> may be any
1295 unsigned integer. &nbsp;If <span style="font-style: italic;">textureID</span>
1299 the <span style="font-style: italic;">current texture object</span>.
1300 &nbsp;Subsequent <span style="font-weight: bold;">glTexParameter </span>and<span
1301 style="font-weight: bold;">glTexImage2D<span
1302 style="font-style: italic;"> </span></span>calls will effect the
1304 <span style="font-style: italic;"></span><span
1305 style="font-weight: bold;"><span style="font-style: italic;"> </span></span><br>
1309 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glDeleteTextures</span>(GLsizei<span
1310 style="font-style: italic;">n</span>, const GLuint *<span
1311 style="font-style: italic;">textureIDs</span>)<br>
1314 <span style="font-style: italic;">textureIDs</span> is an array of <span
1315 style="font-style: italic;">n</span> texture IDs. &nbsp;The named
1323 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glGenTextures</span>(GLsizei<span
1324 style="font-style: italic;"> n</span>, GLuint *<span
1325 style="font-style: italic;">textureIDs</span>)<br>
1328 An array of <span style="font-style: italic;">n</span> unused texture
1329 IDs will be returned in the <span style="font-style: italic;">textureIDs</span>
1345 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glScissor</span>(GLint<span
1346 style="font-style: italic;">x</span>, GLint <span
1347 style="font-style: italic;">y</span>, GLsizei <span
1348 style="font-style: italic;">width</span>, GLsizei<span
1349 style="font-style: italic;"> height</span>)<br>
1353 style="font-style: italic;">x, y</span>) and the given <span
1354 style="font-style: italic;">width</span> and <span
1355 style="font-style: italic;">height</span>. &nbsp;The scissor test is
1356 enabled and disabled with the command <span style="font-weight: bold;">glEnable</span>(GL_SCISSOR_TEST)
1357 and <span style="font-weight: bold;">glDisable</span>(GL_SCISSOR_TEST).<br>
1361 style="font-style: italic;">x</span> &lt;= x<sub>f</sub> &lt; <span
1362 style="font-style: italic;">x</span> + <span
1363 style="font-style: italic;">width</span> and <span
1364 style="font-style: italic;">y</span> &lt;= y<sub>f</sub> &lt; <span
1365 style="font-style: italic;">y</span> + <span
1366 style="font-style: italic;">height. &nbsp;</span>Otherwise, the
1369 If <span style="font-style: italic;">width</span> or <span
1370 style="font-style: italic;">height</span> is less than zero the error
1380 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glAlphaFunc</span>(GLenum<span
1381 style="font-style: italic;">mode</span>, GLclampf <span
1382 style="font-style: italic;">reference</span>)<br>
1385 <span style="font-style: italic;">mode</span> specifies an inequality
1386 and <span style="font-style: italic;">reference</span> specifies a value
1388 modes&nbsp;<span style="font-style: italic;"></span>and the
1392 style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
1395 <td style="vertical-align: top;">Comparison mode<br>
1397 <td style="vertical-align: top;">The test passes if<br>
1401 <td style="vertical-align: top;">GL_LESS<br>
1403 <td style="vertical-align: top;">alpha &lt; <span
1404 style="font-style: italic;">reference</span><br>
1408 <td style="vertical-align: top;">GL_LEQUAL<br>
1410 <td style="vertical-align: top;">alpha &lt;= <span
1411 style="font-style: italic;">reference</span></td>
1414 <td style="vertical-align: top;">GL_GREATER<br>
1416 <td style="vertical-align: top;">alpha &gt; <span
1417 style="font-style: italic;">reference</span></td>
1420 <td style="vertical-align: top;">GL_GEQUAL<br>
1422 <td style="vertical-align: top;">alpha &gt;= <span
1423 style="font-style: italic;">reference</span></td>
1426 <td style="vertical-align: top;">GL_EQUAL<br>
1428 <td style="vertical-align: top;">alpha == <span
1429 style="font-style: italic;">reference</span></td>
1432 <td style="vertical-align: top;">GL_NOTEQUAL<br>
1434 <td style="vertical-align: top;">alpha != <span
1435 style="font-style: italic;">reference</span></td>
1438 <td style="vertical-align: top;">GL_NEVER<br>
1440 <td style="vertical-align: top;">never pass<br>
1444 <td style="vertical-align: top;">GL_ALWAYS<br>
1446 <td style="vertical-align: top;">always passes<br>
1452 The <span style="font-style: italic;">reference</span> parameter is
1456 style="font-weight: bold;">glEnable</span>(GL_ALPHA_TEST) and <span
1457 style
1471 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glStencilFunc</span>(GLenum<span
1472 style="font-style: italic;">func</span>, GLint <span
1473 style="font-style: italic;">ref</span>, GLuint <span
1474 style="font-style: italic;">mask</span>)<br>
1475 void <span style="font-weight: bold;">glStencilOp</span>(GLenum <span
1476 style="font-style: italic;">stencilFail</span>, GLenum <span
1477 style="font-style: italic;">depthTestFail</span>, GLenum <span
1478 style="font-style: italic;">depthTestPass</span>)<br>
1481 The <span style="font-weight: bold;">glStencilFunc<span
1482 style="font-style: italic;"> </span></span>command controls the
1483 stencil test while <span style="font-weight: bold;">glStencilOp</span>
1487 <span style="font-style: italic;">ref</span> is clamped to the range [0,
1489 stencil buffer.<span style="font-style: italic;"></span><br>
1492 style="font-style: italic;">func</span> parameter and when the stencil
1495 style="font-style: italic;">mask</span> parameter before the test.<br>
1497 <span style="font-style: italic;"></span><span
1498 style="font-style: italic;"></span><span style="font-style: italic;"></span>
1500 style="text-align: left; margin-left: auto; margin-right: auto; width: 70%;"
1504 <td style="vertical-align: top;">Stencil <span
1505 style="font-style: italic;">func</span> value<br>
1507 <td style="vertical-align: top;">Stencil test passes if<br>
1511 <td style="vertical-align: top;">GL_LESS<br>
1513 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>&amp;<span
1514 style="font-style: italic;">mask)</span> &lt; (stencil buffer value
1515 &amp; <span style="font-style: italic;">mask)</span><br>
1519 <td style="vertical-align: top;">GL_LEQUAL<br>
1521 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
1522 &amp; <span style="font-style: italic;">mask) </span>&lt;= (stencil
1523 buffer value &amp; <span style="font-style: italic;">mask)</span></td>
1526 <td style="vertical-align: top;">GL_GREATER<br>
1528 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
1529 &amp; <span style="font-style: italic;">mask) </span>&gt; (stencil
1530 buffer value &amp; <span style="font-style: italic;">mask)</span></td>
1533 <td style="vertical-align: top;">GL_GEQUAL<br>
1535 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
1536 &amp; <span style="font-style: italic;">mask) </span>&gt;= (stencil
1537 buffer value &amp; <span style="font-style: italic;">mask)</span></td>
1540 <td style="vertical-align: top;">GL_EQUAL<br>
1542 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
1543 &amp; <span style="font-style: italic;">mask) </span>== (stencil
1544 buffer value &amp; <span style="font-style: italic;">mask)</span></td>
1547 <td style="vertical-align: top;">GL_NOTEQUAL<br>
1549 <td style="vertical-align: top;"><span style="font-style: italic;">(ref</span>
1550 &amp; <span style="font-style: italic;">mask) </span>!= (stencil
1551 buffer value &amp; <span style="font-style: italic;">mask)</span></td>
1554 <td style="vertical-align: top;">GL_NEVER<br>
1556 <td style="vertical-align: top;">never passes<br>
1560 <td style="vertical-align: top;">GL_ALWAYS<br>
1562 <td style="vertical-align: top;">always passes<br>
1568 <span style="font-style: italic;"></span><br>
1572 style="font-style: italic;">stencilFail</span> parameter to <span
1573 style="font-weight: bold;">glStencilOp</span>.<br>
1576 style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
1579 <td style="vertical-align: top;"><span style="font-style: italic;">stencilFail</span>
1582 <td style="vertical-align: top;">New stencil buffer value<br>
1586 <td style="vertical-align: top;">GL_KEEP<br>
1588 <td style="vertical-align: top;">originalValue<br>
1592 <td style="vertical-align: top;">GL_ZERO<br>
1594 <td style="vertical-align: top;">0<br>
1598 <td style="vertical-align: top;">GL_INVERT<br>
1600 <td style="vertical-align: top;">BitWiseInvert(originalValue)
1605 <td style="vertical-align: top;">GL_REPLACE<br>
1607 <td style="vertical-align: top;"><span style="font-style: italic;">ref</span><br>
1611 <td style="vertical-align: top;">GL_INCR<br>
1613 <td style="vertical-align: top;">originalValue + 1, clamped to
1617 <td style="vertical-align: top;">GL_DECR<br>
1619 <td style="vertical-align: top;">originalValue - 1, clamped to
1624 <span style="font-style: italic;"></span><span
1625 style="font-style: italic;"></span><br>
1627 The <span style="font-style: italic;">depthTestFail</span> and <span
1628 style="font-style: italic;">depthTestPass</span> parameters to <span
1629 style="font-weight: bold;">glStencilOp</span> are ignored. &nbsp;Values
1630 for <span style="font-style: italic;">func</span> and <span
1631 style="font-style: italic;">stencilFail</span> other than those listed
1635 style="font-weight: bold;">glEnable</span>(GL_STENCIL_TEST) and <span
1636 style="font-weight: bold;">glDisable</span>(GL_STENCIL_TEST).<br>
1644 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glStencilMask</span>(GLuint<span
1645 style="font-style: italic;">mask</span>)<br>
1648 Only the bits which are set in <span style="font-style: italic;">mask</span>
1651 style="font-style: italic;">mask</span> are relevant. &nbsp;The default
1660 style="font-weight: bold;">glEnable</span>(GL_BLEND) and <span
1661 style="font-weight: bold;">glDisable</span>(GL_BLEND).<br>
1664 style="font-weight: bold;">glEnable</span>(GL_LOGIC_OP) and <span
1665 style="font-weight: bold;">glDisable</span>(GL_LOGIC_OP).<br>
1673 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glLogicop</span>(GLenum<span
1674 style="font-style: italic;">mode</span>)<br>
1685 style="font-style: italic;">mode</span> and the boolean arithmetic used
1687 style="font-style: italic;"></span><span style="font-style: italic;"></span><span
1688 style="font-style: italic;"></span><span style="font-style: italic;"></span><span
1689 style="font-style: italic;"></span> with the destination framebuffer
1693 style="text-align: left; width: 50%; margin-left: auto; margin-right: auto;">
1696 <td style="vertical-align: top;">LogicOp <span
1697 style="font-style: italic;">mode</span><br>
1699 <td style="vertical-align: top;">Resulting channel value<br>
1703 <td style="vertical-align: top;">GL_CLEAR<br>
1705 <td style="vertical-align: top;">0<br>
1709 <td style="vertical-align: top;">GL_SET<br>
1711 <td style="vertical-align: top;">~0<br>
1715 <td style="vertical-align: top;">GL_COPY<br>
1717 <td style="vertical-align: top;">src<br>
1721 <td style="vertical-align: top;">GL_COPY_INVERTED<br>
1723 <td style="vertical-align: top;">~s<br>
1727 <td style="vertical-align: top;">GL_NOOP<br>
1729 <td style="vertical-align: top;">dst<br>
1733 <td style="vertical-align: top;">GL_INVERT<br>
1735 <td style="vertical-align: top;">~dst<br>
1739 <td style="vertical-align: top;">GL_AND<br>
1741 <td style="vertical-align: top;">src &amp; dst<br>
1745 <td style="vertical-align: top;">GL_NAND<br>
1747 <td style="vertical-align: top;">~(src &amp; dst)<br>
1751 <td style="vertical-align: top;">GL_AND_REVERSE<br>
1753 <td style="vertical-align: top;">src &amp; ~dst<br>
1757 <td style="vertical-align: top;">GL_AND_INVERTED<br>
1759 <td style="vertical-align: top;">~src &amp; dst<br>
1763 <td style="vertical-align: top;">GL_OR<br>
1765 <td style="vertical-align: top;">src | dst<br>
1769 <td style="vertical-align: top;">GL_NOR<br>
1771 <td style="vertical-align: top;">~(src | dst)<br>
1775 <td style="vertical-align: top;">GL_OR_REVERSE<br>
1777 <td style="vertical-align: top;">src | ~dst<br>
1781 <td style="vertical-align: top;">GL_OR_INVERTED<br>
1783 <td style="vertical-align: top;">~src | dst<br>
1787 <td style="vertical-align: top;">GL_XOR<br>
1789 <td style="vertical-align: top;">src ^ dst<br>
1793 <td style="vertical-align: top;">GL_EQUIV<br>
1795 <td style="vertical-align: top;">~(src ^ dst)<br>
1803 Specifying any value for <span style="font-style: italic;">mode</span>
1807 The default value for <span style="font-style: italic;">mode</span> is
1813 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glBlendFunc</span>(GLenum<span
1814 style="font-style: italic;">srcTerm</span>, GLenum <span
1815 style="font-style: italic;">dstTerm</span>)<br>
1823 <div style="margin-left: 40px;">Cv = Cf * <span
1824 style="font-style: italic;">srcTerm</span> + Cb * <span
1825 style="font-style: italic;">dstTerm</span><br>
1826 <span style="font-style: italic;"></span></div>
1827 <span style="font-style: italic;"> </span><br>
1828 All possible values for <span style="font-style: italic;">srcTerm</span>
1832 style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
1835 <td style="vertical-align: top;"><span style="font-style: italic;">srcTerm</span><br>
1837 <td style="vertical-align: top;"><span style="font-style: italic;">srcTerm</span>Arithmetic<br>
1841 <td style="vertical-align: top;">GL_ZERO<br>
1843 <td style="vertical-align: top;">(0, 0, 0, 0)<br>
1847 <td style="vertical-align: top;">GL_ONE<br>
1849 <td style="vertical-align: top;">(1, 1, 1, 1)<br>
1853 <td style="vertical-align: top;">GL_DST_COLOR<br>
1855 <td style="vertical-align: top;">(Rb, Gb, Bb, Ab)<br>
1859 <td style="vertical-align: top;">GL_ONE_MINUS_DST_COLOR<br>
1861 <td style="vertical-align: top;">(1-Rb, 1-Gb, 1-Bb, 1-Ab)<br>
1865 <td style="vertical-align: top;">GL_SRC_ALPHA<br>
1867 <td style="vertical-align: top;">(Af, Af, Af, AF)<br>
1871 <td style="vertical-align: top;">GL_ONE_MINUS_SRC_ALPHA<br>
1873 <td style="vertical-align: top;">(1-Af, 1-Af, 1-Af, 1-Af)<br>
1877 <td style="vertical-align: top;">GL_DST_ALPHA<br>
1879 <td style="vertical-align: top;">(Ab, Ab, Ab, Ab)<br>
1883 <td style="vertical-align: top;">GL_ONE_MINUS_DST_ALPHA<br>
1885 <td style="vertical-align: top;">(1-Ab, 1-Ab, 1-Ab, 1-Ab)<br>
1889 <td style="vertical-align: top;">GL_SRC_ALPHA_SATURATE<br>
1891 <td style="vertical-align: top;">(m, m, m, 1) where m = MIN(Af,
1898 All possible values for <span style="font-style: italic;">srcTerm</span>
1902 style="text-align: left; width: 70%; margin-left: auto; margin-right: auto;">
1905 <td style="vertical-align: top;"><span style="font-style: italic;">dstTerm</span><br>
1907 <td style="vertical-align: top;"><span style="font-style: italic;">dstTerm</span>Arithmetic<br>
1911 <td style="vertical-align: top;">GL_ZERO<br>
1913 <td style="vertical-align: top;">(0, 0, 0, 0)<br>
1917 <td style="vertical-align: top;">GL_ONE<br>
1919 <td style
1923 <td style="vertical-align: top;">GL_SRC_COLOR<br>
1925 <td style="vertical-align: top;">(Rf, Gf, Bf, Af)<br>
1929 <td style="vertical-align: top;">GL_ONE_MINUS_SRC_COLOR<br>
1931 <td style="vertical-align: top;">(1-Rf, 1-Gf, 1-Bf, 1-Af)<br>
1935 <td style="vertical-align: top;">GL_SRC_ALPHA<br>
1937 <td style="vertical-align: top;">(Af, Af, Af, AF)<br>
1941 <td style="vertical-align: top;">GL_ONE_MINUS_SRC_ALPHA<br>
1943 <td style="vertical-align: top;">(1-Af, 1-Af, 1-Af, 1-Af)<br>
1947 <td style="vertical-align: top;">GL_DST_ALPHA<br>
1949 <td style="vertical-align: top;">(Ab, Ab, Ab, Ab)<br>
1953 <td style="vertical-align: top;">GL_ONE_MINUS_DST_ALPHA<br>
1955 <td style="vertical-align: top;">(1-Ab, 1-Ab, 1-Ab, 1-Ab)<br>
1963 Values for <span style="font-style: italic;">srcTerm</span> and <span
1964 style="font-style: italic;">dstTerm</span> other than those listed in
1967 The default value for <span style="font-style: italic;">srcTerm</span>
1968 is GL_ONE. &nbsp;The default value for <span style="font-style: italic;">dstTerm</span>
1977 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glColorMask</span>(GLboolean<span
1978 style="font-style: italic;">redMask</span>, GLboolean <span
1979 style="font-style: italic;">greenMask</span>, GLboolean <span
1980 style="font-style: italic;">blueMask</span>, GLboolean <span
1981 style="font-style: italic;">alphaMask</span>)<br>
1985 style="font-style: italic;">redMask</span> is GL_TRUE then writing to
1992 style="font-weight: bold;">glEnable</span>/<span
1993 style="font-weight: bold;">glDisable</span> commands.<br>
2007 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glClear</span>(GLbitfield<span
2008 style="font-style: italic;">buffers</span>)<br>
2011 <span style="font-style: italic;">buffers</span> is a bitmask for which
2020 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glDrawBuffer</span>(GLenum<span
2021 style="font-style: italic;"> buffer</span>)<br>
2024 <span style="font-style: italic;">buffer</span> may be either GL_FRONT,
2026 will be modified by <span style="font-weight: bold;">glClear</span> and
2028 will be modified by <span style="font-weight: bold;">glClear</span> and
2030 will be modified by <span style="font-weight: bold;">glClear</span> or
2035 style="font-weight: bold;">glScissor</span> command, effects <span
2036 style="font-weight: bold;">glClear</span><span
2037 style="font-style: italic;">,</span><span style="font-style: italic;"> </span>limiting
2039 style="font-weight: bold;"></span>only the color channels enabled by <span
2040 style="font-weight: bold;">glColorMask</span> will be effected by <span
2041 style="font-weight: bold;">glClear</span>(GL_COLOR_BUFFER_BIT).
2043 style="font-weight: bold;">glStencilMask</span> will be effected by <span
2044 style="font-weight: bold;">glClear</span>(GL_STENCIL_BUFFER_BIT).<br>
2048 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glClearColor</span>(GLclampf<span
2049 style="font-style: italic;">red</span>, GLclampf <span
2050 style="font-style: italic;">green</span>, GLclampf <span
2051 style="font-style: italic;">blue</span>, GLclampf <span
2052 style="font-style: italic;">alpha</span>)<br>
2055 Subsequent calls to <span style="font-weight: bold;">glClear</span>
2056 will use the color (<span style="font-style: italic;">red, green, blue,
2058 <span style="font-style: italic;"></span><br>
2061 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glClearStencil</span>(GLint<span
2062 style="font-style: italic;">clearValue</span>)<br>
2066 style="font-style: italic;">clearValue</span> will be used to clear the
2075 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glReadPixels</span>(GLint<span
2076 style="font-style: italic;">x</span>, GLint <span
2077 style="font-style: italic;">y</span>, GLsizei <span
2078 style="font-style: italic;">width</span>, GLsizei <span
2079 style="font-style: italic;">height</span>, GLenum <span
2080 style="font-style: italic;">format</span>, GLenum <span
2081 style="font-style: italic;">type</span>, GLvoid *<span
2082 style="font-style: italic;">data</span>)<br>
2085 <span style="font-style: italic;">x</span> and <span
2086 style="font-style: italic;">y</span> specify the coordinate of the
2088 style="font-style: italic;">width</span> and <span
2089 style="font-style: italic;">height</span> specify the size of the
2090 rectangular region to read. &nbsp;<span style="font-style: italic;">format</span>
2092 GL_RGBA.&nbsp; <span style="font-style: italic;">type</span> specify the
2094 GL_FLOAT. &nbsp;Other values for <span style="font-style: italic;">format</span>
2095 or <span style="font-style: italic;">type</span> will cause the error
2104 style="font-style: italic;">type </span>is GL_UNSIGNED_BYTE or
2106 style="font-style: italic;">type</span> is GL_FLOAT. &nbsp;The (red,
2110 Image data is <span style="font-style: italic;">packed</span> into
2114 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glPixelStorei</span>(GLenum<span
2115 style="font-style: italic;"> pname</span>, GLint <span
2116 style="font-style: italic;">value</span>)<br>
2119 <span style="font-style: italic;">pname</span> must be
2120 GL_PACK_ROW_LENGTH. &nbsp;<span style="font-style: italic;">value</span>
2123 then the <span style="font-style: italic;">width</span> parameter to <span
2124 style="font-weight: bold;">glReadPixels</span> indicates the row stride.<br>
2128 <div style="margin-left: 40px;">if (GL_PACK_ROW_LENGTH == 0)<br>
2129 &nbsp;&nbsp;&nbsp; rowLength = <span style="font-style: italic;">width</span>;<br>
2133 if (<span style="font-style: italic;">format</span> == GL_RGB) {<br>
2134 &nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">height</span>;
2137 style="font-style: italic;">width</span>; j++) {<br>
2141 style="font-style: italic;">data</span>[k+0] = FrameBuffer(<span
2142 style="font-style: italic;">x</span> + j, <span
2143 style="font-style: italic;">y</span> + i).red;<br>
2145 style="font-style: italic;">data</span>[k+1] = FrameBuffer(<span
2146 style="font-style: italic;">x</span> + j, <span
2147 style="font-style: italic;">y</span> + i).green;<br>
2149 style="font-style: italic;">data</span>[k+2] = FrameBuffer(<span
2150 style="font-style: italic;">x</span> + j, <span
2151 style="font-style: italic;">y</span> + i).blue;<span
2152 style="font-style: italic;"></span><br>
2157 &nbsp;&nbsp;&nbsp; for (i = 0; i &lt; <span style="font-style: italic;">height</span>;
2160 style="font-style: italic;">width</span>; j++) {<br>
2164 style="font-style: italic;">data</span>[k+0] = FrameBuffer(<span
2165 style="font-style: italic;">x</span> + j, <span
2166 style="font-style: italic;">y</span> + i).red;<br>
2168 style="font-style: italic;">data</span>[k+1] = FrameBuffer(<span
2169 style="font-style: italic;">x</span> + j, <span
2170 style="font-style: italic;">y</span> + i).green;<br>
2172 style="font-style: italic;">data</span>[k+2] = FrameBuffer(<span
2173 style="font-style: italic;">x</span> + j, <span
2174 style="font-style: italic;">y</span> + i).blue;<span
2175 style="font-style: italic;"></span><br>
2177 style="font-style: italic;">data</span>[k+3] = FrameBuffer(<span
2178 style="font-style: italic;">x</span> + j, <span
2179 style="font-style: italic;">y</span> + i).alpha;<span
2180 style="font-style: italic;"></span><br>
2186 The function FrameBuffer(<span style="font-style: italic;">c, r</span>)
2188 style="font-style: italic;">c</span> of row <span
2189 style="font-style: italic;">r. &nbsp;</span><span
2190 style="font-style: italic;">data</span> is considered to be either a
2192 style="font-style: italic;">type</span> parameter. &nbsp;Similarly, the
2195 style="font-style: italic;">type</span> parameter.<br>
2200 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glReadBuffer</span>(GLenum<span
2201 style="font-style: italic;">buffer</span>)<br>
2205 style="font-weight: bold;">glReadPixels</span>. &nbsp;If <span
2206 style="font-style: italic;">buffer</span> is GL_FRONT then front color
2207 buffer is the source. &nbsp;If <span style="font-style: italic;">buffer</span>
2210 &nbsp;Any invalid value for <span style="font-style: italic;">buffer</span>
2218 style="font-style: italic;">picking</span>: determining which
2222 <div style="margin-left: 40px;">GLint <span style="font-weight: bold;">glRenderMode</span>(GLenum<span
2223 style="font-style: italic;">mode</span>)<br>
2227 style="font-style: italic;">mode</span> is GL_SELECTION the graphics
2229 style="font-style: italic;">mode</span> is GL_RENDER the graphic
2231 style="font-style: italic;">mode</span> will raise the error
2236 been drawn is placed in the <span style="font-style: italic;">selection</span> <span
2237 style="font-style: italic;">buffer</span>. &nbsp;The selection buffer
2240 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glSelectionBuffer</span>(GLsizei<span
2241 style="font-style: italic;">n</span>, GLuint *<span
2242 style="font-style: italic;">buffer</span>)<br>
2244 <span style="font-style: italic;"></span><span
2245 style="font-style: italic;"><br>
2246 buffer</span> is an array of <span style="font-style: italic;">n</span>
2247 unsigned integers. &nbsp;No more than <span style="font-style: italic;">n</span>
2250 The <span style="font-style: italic;">name stack</span> is a stack
2254 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glInitNames</span>(void)<br>
2255 void <span style="font-weight: bold;">glPushName</span>(GLuint <span
2256 style="font-style: italic;">name</span>)<br>
2257 void <span style="font-weight: bold;">glPopName</span>(void)<br>
2258 void <span style="font-weight: bold;">glLoadName</span>(GLuint <span
2259 style="font-style: italic;">name</span>)<br>
2262 <span style="font-weight: bold;">glInitNames</span> resets the name
2263 stack to an empty state. &nbsp;<span style="font-weight: bold;">glPushName<span
2264 style="font-style: italic;"> </span></span>pushes the given <span
2265 style="font-style: italic;">name</span> value onto the stack. &nbsp;<span
2266 style="font-weight: bold;">glPopName</span> pops the top name from the
2267 stack. &nbsp;<span style
2268 style="font-style: italic;"> </span></span>replaces the top value on
2269 the stack with the specified <span style="font-style: italic;">name</span>.
2275 discarded by clipping cause the <span style="font-style: italic;">hit</span> <span
2276 style="font-style: italic;">data</span> to be updated. &nbsp;The hit
2285 When any of <span style="font-weight: bold;">glInitNames</span><span
2286 style="font-style: italic;"><span style="font-style: italic;">, </span></span><span
2287 style="font-weight: bold;">glPushName</span>, <span
2288 style="font-weight: bold;">glPopName</span>, <span
2289 style="font-weight: bold;">glLoadName</span> or <span
2290 style="font-weight: bold;">glRenderMode</span> are called and the hit
2291 flag is set, a <span style="font-style: italic;">hit record</span> is
2304 style="font-weight: bold;">glRenderMode</span>(GL_RENDER). &nbsp; The
2305 return value of <span style="font-weight: bold;">glRenderMode</span>
2313 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glFlush</span>(void)<br>
2318 <div style="margin-left: 40px;"><br>
2319 void <span style="font-weight: bold;">glFinish</span>(void)<br>
2323 commands are completed. &nbsp;<span style="font-weight: bold;">glFlush</span>
2329 buffer may not appear. &nbsp;The <span style="font-style: italic;">swapbuffers</span>
2332 style="font-weight: bold;">glReadPixels</span> command also does an
2343 <div style="margin-left: 40px;">void <span style="font-weight: bold;">glGetFloatv</span>(GLenum<span
2344 style="font-style: italic;">pname</span>, GLfloat *<span
2345 style="font-style: italic;">values</span>)<br>
2349 style="font-style: italic;">pname</span>. &nbsp;The following table
2350 lists all accepted values for <span style="font-style: italic;">pname</span>
2352 style="font-style: italic;">pname</span> causes the error
2356 style="text-align: left; width: 90%; margin-left: auto; margin-right: auto;">
2359 <td style="vertical-align: top;">Variable (<span
2360 style="font-style: italic;">pname)</span><br>
2362 <td style="vertical-align: top;">Number of values<br>
2364 <td style="vertical-align: top;">Value(s) Description<br>
2368 <td style="vertical-align: top;">GL_ALPHA_BITS<br>
2370 <td style="vertical-align: top;">1<br>
2372 <td style="vertical-align: top;">Number of bits per alpha value
2377 <td style="vertical-align: top;">GL_ALPHA_TEST<br>
2379 <td style="vertical-align: top;">1<br>
2381 <td style="vertical-align: top;">Zero if the alpha test is
2387 <td style="vertical-align: top;">GL_ALPHA_TEST_FUNC<br>
2389 <td style="vertical-align: top;">1<br>
2391 <td style="vertical-align: top;">The alpha test function.<br>
2395 <td style="vertical-align: top;">GL_BLEND<br>
2397 <td style="vertical-align: top;">1<br>
2399 <td style="vertical-align: top;">Zero if blending is disabled.<br>
2404 <td style="vertical-align: top;">GL_BLEND_DST<br>
2406 <td style="vertical-align: top;">1<br>
2408 <td style="vertical-align: top;">Blend destination function/term.<br>
2412 <td style="vertical-align: top;">GL_BLEND_SRC<br>
2414 <td style="vertical-align: top;">1<br>
2416 <td style="vertical-align: top;">Blend source function/term.<br>
2420 <td style="vertical-align: top;">GL_BLUE_BITS<br>
2422 <td style="vertical-align: top;">1<br>
2424 <td style="vertical-align: top;">Number of bits per blue value in
2429 <td style="vertical-align: top;">GL_COLOR_CLEAR_VALUE<br>
2431 <td style="vertical-align: top;">4<br>
2433 <td style="vertical-align: top;">Clear color (red, green, blue,
2438 <td style="vertical-align: top;">GL_COLOR_WRITE_MASK<br>
2440 <td style="vertical-align: top;">4<br>
2442 <td style="vertical-align: top;">Color buffer writemask (red,
2449 <td style="vertical-align: top;">GL_CULL_FACE<br>
2451 <td style="vertical-align: top;">1<br>
2453 <td style="vertical-align: top;">Zero if polygon culling is
2459 <td style="vertical-align: top;">GL_CULL_FACE_MODE<br>
2461 <td style="vertical-align: top;">1<br>
2463 <td style="vertical-align: top;">Polygon cull mode: GL_FRONT,
2468 <td style="vertical-align: top;">GL_CURRENT_COLOR<br>
2470 <td style="vertical-align: top;">4<br>
2472 <td style="vertical-align: top;">Current color (red, green, blue,
2477 <td style="vertical-align: top;">GL_CURRENT_RASTER_COLOR<br>
2479 <td style="vertical-align: top;">4<br>
2481 <td style="vertical-align: top;">Current raster position color
2486 <td style="vertical-align: top;">GL_CURRENT_RASTER_TEXTURE_COORDS<br>
2488 <td style="vertical-align: top;">4<br>
2490 <td style="vertical-align: top;">Current raster position texture
2495 <td style="vertical-align: top;">GL_CURRENT_RASTER_POSITION<br>
2497 <td style="vertical-align: top;">4<br>
2499 <td style="vertical-align: top;">Current raster position (x, y,
2504 <td style="vertical-align: top;">GL_CURRENT_POSITION_VALID<br>
2506 <td style="vertical-align: top;">1<br>
2508 <td style="vertical-align: top;">Zero if current raster position
2514 <td style="vertical-align: top;">GL_CURRENT_TEXTURE_COORDS<br>
2516 <td style="vertical-align: top;">4<br>
2518 <td style="vertical-align: top;">Current texture coordinates (s,
2523 <td style="vertical-align: top;">GL_DOUBLEBUFFER<br>
2525 <td style="vertical-align: top;">1<br>
2527 <td style="vertical-align: top;">Zero if color buffer is
2533 <td style="vertical-align: top;">GL_DRAW_BUFFER<br>
2535 <td style="vertical-align: top;">1<br>
2537 <td style="vertical-align: top;">Current color draw buffer:
2542 <td style="vertical-align: top;">GL_FRONT_FACE</td>
2543 <td style="vertical-align: top;">1<br>
2545 <td style="vertical-align: top;">Polygon front-face winding:
2550 <td style="vertical-align: top;">GL_GREEN_BITS<br>
2552 <td style="vertical-align: top;">1<br>
2554 <td style="vertical-align: top;">Number of bits per green value
2559 <td style="vertical-align: top;">GL_LINE_SMOOTH<br>
2561 <td style="vertical-align: top;">1<br>
2563 <td style="vertical-align: top;">Zero if line smoothing is
2569 <td style="vertical-align: top;">GL_LINE_STIPPLE<br>
2571 <td style="vertical-align: top;">1<br>
2573 <td style="vertical-align: top;">Zero if line stippling is
2579 <td style="vertical-align: top;">GL_LINE_STIPPLE_PATTERN<br>
2581 <td style="vertical-align: top;">1<br>
2583 <td style="vertical-align: top;">Line stipple pattern.<br>
2587 <td style="vertical-align: top;">GL_LINE_STIPPLE_REPEAT<br>
2589 <td style="vertical-align: top;">1<br>
2591 <td style="vertical-align: top;">Line stipple repeat factor.<br>
2595 <td style="vertical-align: top;">GL_LINE_WIDTH<br>
2597 <td style="vertical-align: top;">1<br>
2599 <td style="vertical-align: top;">Line width in pixels.<br>
2603 <td style="vertical-align: top;">GL_LINE_WIDTH_GRANULARITY<br>
2605 <td style="vertical-align: top;">1<br>
2607 <td style="vertical-align: top;">Aliased line width granularity.<br>
2611 <td style="vertical-align: top;">GL_LINE_WIDTH_RANGE<br>
2613 <td style="vertical-align: top;">2<br>
2615 <td style="vertical-align: top;">Minimum and maximum aliased line
2620 <td style="vertical-align: top;">GL_ALIASED_LINE_WIDTH_RANGE<br>
2622 <td style="vertical-align: top;">2<br>
2624 <td style="vertical-align: top;">Minimum and maximum antialiased
2628 <td style="vertical-align: top;">GL_COLOR_LOGIC_OP<br>
2630 <td style="vertical-align: top;">1<br>
2632 <td style="vertical-align: top;">Zero if logicop is disabled.<br>
2637 <td style="vertical-align: top;">GL_LOGIC_OP_MODE<br>
2639 <td style="vertical-align: top;">1<br>
2641 <td style="vertical-align: top;">Logicop function.<br>
2645 <td style="vertical-align: top;">GL_MATRIX_MODE<br>
2647 <td style="vertical-align: top;">1<br>
2649 <td style="vertical-align: top;">Matrix mode: GL_MODELVIEW or
2654 <td style="vertical-align: top;">GL_MAX_MODELVIEW_STACK_DEPTH<br>
2656 <td style="vertical-align: top;">1<br>
2658 <td style="vertical-align: top;">Maximum size of the modelview
2663 <td style="vertical-align: top;">GL_MAX_NAME_STACK_DEPTH<br>
2665 <td style="vertical-align: top;">1<br>
2667 <td style="vertical-align: top;">Maximum size of the selection
2672 <td style="vertical-align: top;">GL_MAX_PROJECTION_STACK_DEPTH<br>
2674 <td style="vertical-align: top;">1<br>
2676 <td style="vertical-align: top;">Maximum size of the projection
2681 <td style="vertical-align: top;">GL_MAX_TEXTURE_SIZE<br>
2683 <td style="vertical-align: top;">1<br>
2685 <td style="vertical-align: top;">Maximum 2D texture image width
2690 <td style="vertical-align: top;">GL_MAX_VIEWPORT_DIMS<br>
2692 <td style="vertical-align: top;">2</td>
2693 <td style="vertical-align: top;">Maximum viewport width and
2698 <td style="vertical-align: top;">GL_MODELVIEW_MATRIX<br>
2700 <td style="vertical-align: top;">16<br>
2702 <td style="vertical-align: top;">Current/top modelview matrix
2707 <td style="vertical-align: top;">GL_MODELVIEW_MATRIX_STACK_DEPTH<br>
2709 <td style="vertical-align: top;">1<br>
2711 <td style="vertical-align: top;">Current size of the modelview
2716 <td style="vertical-align: top;">GL_NAME_STACK_DEPTH<br>
2718 <td style="vertical-align: top;">1<br>
2720 <td style="vertical-align: top;">Current size of the selection
2725 <td style="vertical-align: top;">GL_PACK_ROW_LENGTH<br>
2727 <td style="vertical-align: top;">1<br>
2729 <td style="vertical-align: top;">Pixel packing row length.<br>
2733 <td style="vertical-align: top;">GL_POLYGON_SMOOTH<br>
2735 <td style="vertical-align: top;">1<br>
2737 <td style="vertical-align: top;">Zero if polygon smoothing is
2743 <td style="vertical-align: top;">GL_PROJECTION_MATRIX<br>
2745 <td style="vertical-align: top;">16<br>
2747 <td style="vertical-align: top;">Current/top projection matrix
2752 <td style="vertical-align: top;">GL_PROJECTION_STACK_DEPTH<br>
2754 <td style="vertical-align: top;">1<br>
2756 <td style="vertical-align: top;">Current size of projection
2761 <td style="vertical-align: top;">GL_READ_BUFFER<br>
2763 <td style="vertical-align: top;">1<br>
2765 <td style="vertical-align: top;">Current read buffer: GL_FRONT or
2770 <td style="vertical-align: top;">GL_RED_BITS<br>
2772 <td style="vertical-align: top;">1<br>
2774 style="vertical-align: top;">Number of bits per red value in
2779 <td style="vertical-align: top;">GL_RENDER_MODE<br>
2781 <td style="vertical-align: top;">1<br>
2783 <td style="vertical-align: top;">Current rendering mode:
2788 <td style="vertical-align: top;">GL_RGBA_MODE<br>
2790 <td style="vertical-align: top;">1<br>
2792 <td style="vertical-align: top;">Always one.<br>
2796 <td style="vertical-align: top;">GL_SCISSOR_BOX<br>
2798 <td style="vertical-align: top;">4<br>
2800 <td style="vertical-align: top;">Scissor box (x, y, width,
2805 <td style="vertical-align: top;">GL_SCISSOR_TEST<br>
2807 <td style="vertical-align: top;">1<br>
2809 <td style="vertical-align: top;">Zero if scissor test is disabled.<br>
2814 <td style="vertical-align: top;">GL_SELECTION_BUFFER_SIZE<br>
2816 <td style="vertical-align: top;">1<br>
2818 <td style="vertical-align: top;">Size of selection buffer.<br>
2822 <td style="vertical-align: top;">GL_SHADE_MODEL<br>
2824 <td style="vertical-align: top;">1<br>
2826 <td style="vertical-align: top;">Shade model: GL_FLAT or
2831 <td style="vertical-align: top;">GL_STENCIL_BITS<br>
2833 <td style="vertical-align: top;">1<br>
2835 <td style="vertical-align: top;">Number of bits per stencil value
2840 <td style="vertical-align: top;">GL_STENCIL_CLEAR_VALUE<br>
2842 <td style="vertical-align: top;">1<br>
2844 <td style="vertical-align: top;">Stencil buffer clear value.<br>
2848 <td style="vertical-align: top;">GL_STENCIL_FAIL<br>
2850 <td style="vertical-align: top;">1<br>
2852 <td style="vertical-align: top;">Stencil fail operation.<br>
2856 <td style="vertical-align: top;">GL_STENCIL_FUNC<br>
2858 <td style="vertical-align: top;">1<br>
2860 <td style="vertical-align: top;">Stencil function.<br>
2864 <td style="vertical-align: top;">GL_STENCIL_REF<br>
2866 <td style="vertical-align: top;">1<br>
2868 <td style="vertical-align: top;">Stencil reference value.<br>
2872 <td style="vertical-align: top;">GL_STENCIL_TEST<br>
2874 <td style="vertical-align: top;">1<br>
2876 <td style="vertical-align: top;">Zero if stencil test is disabled.<br>
2881 <td style="vertical-align: top;">GL_STENCIL_VALUE_MASK<br>
2883 <td style="vertical-align: top;">1<br>
2885 <td style="vertical-align: top;">Stencil mask value.<br>
2889 <td style="vertical-align: top;">GL_STENCIL_WRITE_MASK<br>
2891 <td style="vertical-align: top;">1<br>
2893 <td style="vertical-align: top;">Stencil buffer write mask.<br>
2897 <td style="vertical-align: top;">GL_TEXTURE_2D<br>
2899 <td style="vertical-align: top;">1<br>
2901 <td style="vertical-align: top;">Zero if 2D texture mapping is
2907 <td style="vertical-align: top;">GL_TEXTURE_BINDING_2D</td>
2908 <td style="vertical-align: top;">1<br>
2910 <td style="vertical-align: top;">Name of currently bound 2D
2915 <td style="vertical-align: top;">GL_TEXTURE_ENV_COLOR<br>
2917 <td style="vertical-align: top;">4<br>
2919 <td style="vertical-align: top;">Texture environment color (red,
2924 <td style="vertical-align: top;">GL_TEXTURE_ENV_MODE<br>
2926 <td style="vertical-align: top;">1<br>
2928 <td style="vertical-align: top;">Texture environment mode.<br>
2932 <td style="vertical-align: top;">GL_UNPACK_ROW_LENGTH<br>
2934 <td style="vertical-align: top;">1<br>
2936 <td style="vertical-align: top;">Pixel unpacking row length.<br>
2940 <td style="vertical-align: top;">GL_UNPACK_LSB_FIRST<br>
2942 <td style="vertical-align: top;">1<br>
2944 <td style="vertical-align: top;">Zero if most significant bit is
2950 <td style="vertical-align: top;">GL_VIEWPORT<br>
2952 <td style="vertical-align: top;">4<br>
2954 <td style="vertical-align: top;">Current viewport (x, y, width,
2965 <div style="margin-left: 40px;">const GLubyte *<span
2966 style="font-weight: bold;">glGetString</span>(GLenum <span
2967 style="font-style: italic;">name</span>)<br>
2971 style="font-style: italic;">name</span> are described in the following
2975 style="text-align: left; width: 80%; margin-left: auto; margin-right: auto;">
2978 <td style="vertical-align: top;"><span style="font-style: italic;">name</span><br>
2980 <td style="vertical-align: top;">Return value<br>
2984 <td style="vertical-align: top;">GL_VERSION<br>
2986 <td style="vertical-align: top;">The library version, such as
2991 <td style="vertical-align: top;">GL_RENDERER<br>
2993 <td style="vertical-align: top;">The renderer, such as "Mesa DRI
2998 <td style="vertical-align: top;">GL_VENDOR<br>
3000 <td style="vertical-align: top;">The vendor of this
3005 <td style="vertical-align: top;">GL_EXTENSIONS<br>
3007 <td style="vertical-align: top;">A white-space separated list of
3016 <div style="margin-left: 40px;">GLenum <span style="font-weight: bold;">glGetError</span>(void)<br>
3023 style="font-weight: bold;">glGetError</span> returns. &nbsp;The
3027 style="text-align: left; width: 80%; margin-left: auto; margin-right: auto;">
3030 <td style="vertical-align: top;">Error code<br>
3032 <td style="vertical-align: top;">Meaning<br>
3036 <td style="vertical-align: top;">GL_NO_ERROR<br>
3038 <td style="vertical-align: top;">No error has been recorded.<br>
3042 <td style="vertical-align: top;">GL_INVALID_ENUM<br>
3044 <td style="vertical-align: top;">An enum parameter had an invalid
3049 <td style="vertical-align: top;">GL_INVALID_VALUE<br>
3051 <td style="vertical-align: top;">A numeric parameter had an
3056 <td style="vertical-align: top;">GL_INVALID_OPERATION<br>
3058 <td style="vertical-align: top;">A function was called when not
3063 <td style="vertical-align: top;">GL_STACK_OVERFLOW<br>
3065 <td style="vertical-align: top;">The current transformation
3070 <td style="vertical-align: top;">GL_STACK_UNDERFLOW<br>
3072 <td style="vertical-align: top;">The current transformation
3077 <td style="vertical-align: top;">GL_OUT_OF_MEMORY<br>
3079 <td style="vertical-align: top;">The system ran out of dynamic
3094 <div style="margin-left: 40px;"><span style="font-weight: bold;">glFeedbackBuffer</span><br>
3095 <span style="font-weight: bold;">glPassThrough</span><br>
3103 <div style="margin-left: 40px;"><span style="font-weight: bold;">glTexImage1D</span><br
3104 style="font-weight: bold;">
3105 <span style="font-weight: bold;">glTexImage3D</span><br
3106 style="font-weight: bold;">
3107 <span style="font-weight: bold;">glTexSubImage1D</span><br
3108 style="font-weight: bold;">
3109 <span style="font-weight: bold;"> glTexSubImage3D</span><br
3110 style="font-weight: bold;">
3111 <span style="font-weight: bold;">glCopyTexImage1D</span><br
3112 style="font-weight: bold;">
3113 <span style="font-weight: bold;"> glCopyTexSubImage1D</span><br
3114 style="font-weight: bold;">
3115 <span style="font-weight: bold;"> glCopyTexSubImage3D</span><br>
3121 style="font-weight: bold;">glTexImage2D</span>. &nbsp;The following
3124 <div style="margin-left: 40px; font-weight: bold;">glTexSubImage2D<br>
3138 <div style="margin-left: 40px; font-weight: bold;"> glPrioritizeTextures<br>
3153 <div style="margin-left: 40px;"><span style="font-weight: bold;">glDrawPixels<br>
3162 <span style="font-weight: bold;"></span>
3163 <div style="margin-left: 40px;"><span style="font-weight: bold;">glIndexub<br>
3164 </span><span style="font-weight: bold;">glIndexi</span><br>
3165 <span style="font-weight: bold;">glIndexs<br>
3168 </span><span style="font-weight: bold;">glIndexubv<br>
3169 </span><span style="font-weight: bold;">glIndexiv</span><br>
3170 <span style="font-weight: bold;">glIndexsv<br>
3172 glIndexdv</span><span style="font-weight: bold;"><br>
3174 </span><span style="font-weight: bold;">glClearIndex<br>
3175 glIndexPointer</span><br style="font-weight: bold;">
3181 <br style="font-weight: bold;">
3182 <div style="margin-left: 40px;"><span style="font-weight: bold;">glPixelTransferf</span><br
3183 style="font-weight: bold;">
3184 <span style="font-weight: bold;">glPixelTransferi</span><br
3185 style="font-weight: bold;">
3186 <span style="font-weight: bold;">glPixelMapfv</span><br
3187 style="font-weight: bold;">
3188 <span style="font-weight: bold;">glPixelMapuiv</span><br
3189 style="font-weight: bold;">
3190 <span style="font-weight: bold;">glPixelMapusv</span><br
3191 style="font-weight: bold;">
3192 <span style="font-weight: bold;">glGetPixelMapfv</span><br
3193 style="font-weight: bold;">
3194 <span style="font-weight: bold;">glGetPixelMapuiv</span><br
3195 style="font-weight: bold;">
3196 <span style="font-weight: bold;">glGetPixelMapusv</span><br>
3202 <div style="margin-left: 40px;"><span style="font-weight: bold;">glHint<br>
3209 <div style="margin-left: 40px; font-weight: bold;">glGetBooleanv<br>
3227 <div style="margin-left: 40px;"><span style="font-weight: bold;">glPushAttrib</span><br
3228 style="font-weight: bold;">
3229 <span style="font-weight: bold;">glPopAtttrib</span><br>
3230 <br style="font-weight: bold;">
3237 <div style="margin-left: 40px;"><span style="font-weight: bold;">glVertex2d</span><br
3238 style="font-weight: bold;">
3239 <span style="font-weight: bold;">glVertex2dv</span><br
3240 style="font-weight: bold;">
3241 <span style="font-weight: bold;">glVertex3d</span><br
3242 style="font-weight: bold;">
3243 <span style="font-weight: bold;"> glVertex3dv</span><br
3244 style="font-weight: bold;">
3245 <span style="font-weight: bold;">glVertex4d</span><br
3246 style="font-weight: bold;">
3247 <span style="font-weight: bold;"> glVertex4dv</span><br
3248 style="font-weight: bold;">
3249 <span style="font-weight: bold;">glColor3d</span><br
3250 style="font-weight: bold;">
3251 <span style="font-weight: bold;">glColor3d</span><span
3252 style="font-weight: bold;">v</span><br style="font-weight: bold;">
3253 <span style="font-weight: bold;">glColor4d</span><br
3254 style="font-weight: bold;">
3255 <span style="font-weight: bold;"> glColor4dv</span><br
3256 style="font-weight: bold;">
3257 <span style="font-weight: bold;">glTexCoord1d</span><br
3258 style="font-weight: bold;">
3259 <span style="font-weight: bold;">glTexCoord1d</span><span
3260 style="font-weight: bold;">v</span><br style="font-weight: bold;">
3261 <span style="font-weight: bold;">glTexCoord2d</span><br
3262 style="font-weight: bold;">
3263 <span style="font-weight: bold;"> glTexCoord2dv</span><br
3264 style="font-weight: bold;">
3265 <span style="font-weight: bold;">glTexCoord3d</span><br
3266 style="font-weight: bold;">
3267 <span style="font-weight: bold;"> glTexCoord3dv</span><br
3268 style="font-weight: bold;">
3269 <span style="font-weight: bold;">glTexCoord4d</span><br
3270 style="font-weight: bold;">
3271 <span style="font-weight: bold;"> glTexCoord4dv</span><br
3272 style="font-weight: bold;">
3273 <span style="font-weight: bold;">glRasterPos2d</span><br
3274 style="font-weight: bold;">
3275 <span style="font-weight: bold;"> glRasterPos2dv</span><br
3276 style="font-weight: bold;">
3277 <span style="font-weight: bold;">glRasterPos3d</span><br
3278 style="font-weight: bold;">
3279 <span style="font-weight: bold;"> glRasterPos3dv</span><br
3280 style="font-weight: bold;">
3281 <span style="font-weight: bold;">glRasterPos4d</span><br
3282 style="font-weight: bold;">
3283 <span style="font-weight: bold;"> glRasterPos4dv</span><br
3284 style="font-weight: bold;">
3285 <span style="font-weight: bold;">glLoadMatrixd</span><br
3286 style="font-weight: bold;">
3287 <span style
3288 style="font-weight: bold;">
3289 <span style="font-weight: bold;">glScaled</span><br
3290 style="font-weight: bold;">
3291 <span style="font-weight: bold;">glRotated</span><br
3292 style="font-weight: bold;">
3293 <span style="font-weight: bold;">glTranslated<br>
3296 </span> <span style="font-weight: bold;"><br>
3301 <div style="margin-left: 40px;"><span style="font-weight: bold;">glMap1f</span><br
3302 style="font-weight: bold;">
3303 <span style="font-weight: bold;">glMap2d</span><br
3304 style="font-weight: bold;">
3305 <span style="font-weight: bold;">glMap2f</span><br
3306 style="font-weight: bold;">
3307 <span style="font-weight: bold;">glGetMapdv</span><br
3308 style="font-weight: bold;">
3309 <span style="font-weight: bold;">glGetMapfv</span><br
3310 style="font-weight: bold;">
3311 <span style="font-weight: bold;">glGetMapiv</span><br
3312 style="font-weight: bold;">
3313 <span style="font-weight: bold;">glEvalCoord1d</span><br
3314 style="font-weight: bold;">
3315 <span style="font-weight: bold;">glEvalCoord1f</span><br
3316 style="font-weight: bold;">
3317 <span style="font-weight: bold;">glEvalCoord1dv</span><br
3318 style="font-weight: bold;">
3319 <span style="font-weight: bold;">glEvalCoord1fv</span><br
3320 style="font-weight: bold;">
3321 <span style="font-weight: bold;">glEvalCoord2d</span><br
3322 style="font-weight: bold;">
3323 <span style="font-weight: bold;">glEvalCoord2f</span><br
3324 style="font-weight: bold;">
3325 <span style="font-weight: bold;">glEvalCoord2dv</span><br
3326 style="font-weight: bold;">
3327 <span style="font-weight: bold;">glEvalCoord2fv</span><br
3328 style="font-weight: bold;">
3329 <span style="font-weight: bold;">glMapGrid1d</span><br
3330 style="font-weight: bold;">
3331 <span style="font-weight: bold;">glMapGrid1f</span><br
3332 style="font-weight: bold;">
3333 <span style="font-weight: bold;">glMapGrid2d</span><br
3334 style="font-weight: bold;">
3335 <span style="font-weight: bold;">glMapGrid2f</span><br
3336 style="font-weight: bold;">
3337 <span style="font-weight: bold;">glEvalPoint1</span><br
3338 style="font-weight: bold;">
3339 <span style="font-weight: bold;">glEvalPoint2</span><br
3340 style="font-weight: bold;">
3341 <span style="font-weight: bold;">glEvalMesh1</span><br
3342 style="font-weight: bold;">
3343 <span style="font-weight: bold;">glEvalMesh2</span><br
3344 style="font-weight: bold;">
3350 <div style="margin-left: 40px; font-weight: bold;">glIsList<br>
3363 <br style="font-weight: bold;">
3364 <div style="margin-left: 40px;"><span style="font-weight: bold;">glAccum</span><br
3365 style="font-weight: bold;">
3366 <span style="font-weight: bold;">glClearAccum</span><br>
3372 <div style="margin-left: 40px; font-weight: bold;"> glFogi<br>
3381 <div style="margin-left: 40px;"><span style="font-weight: bold;">glDepthFunc</span><br
3382 style="font-weight: bold;">
3383 <span style="font-weight: bold;">glDepthMask</span><br
3384 style="font-weight: bold;">
3385 <span style="font-weight: bold;">glDepthRange</span><br
3386 style="font-weight: bold;">
3387 <span style="font-weight: bold;">glClearDepth</span><br>
3432 style="font-weight: bold;">glTexImage2D</span> and <span
3433 style="font-weight: bold;">glReadPixels</span>?<br>
3435 OpenGL specifies a <span style="font-weight: bold;">large</span>
3441 For <span style="font-weight: bold;">glTexImage2D</span> only allow <span
3442 style="font-style: italic;">type</span>=GL_UNSIGNED_BYTE and <span
3443 style="font-style: italic;">format</span>=GL_RGBA, GL_RGB,
3444 GL_INTENSITY. &nbsp; Only allow <span style="font-style: italic;">internalFormat</span>
3447 hardware. &nbsp;This will allow <span style="font-weight: bold;">glTexImage2D</span>
3448 to basically just use <span style="font-weight: bold;">memcpy</span> to
3451 For <span style="font-weight: bold;">glReadPixels</span>, only allow <span
3452 style="font-style: italic;">type</span> = GL_UNSIGNED_BYTE or GL_FLOAT.
3453 &nbsp;Only allow <span style="font-style: italic;">format</span> =
3481 style="font-weight: bold;">glPrioritizeTextures</span> and the <span
3482 style="font-weight: bold;">glAreTexturesResident</span> command?<br>
3493 multiples for <span style="font-weight: bold;">glBitmap, glTexImage2D</span>
3494 and <span style="font-weight: bold;">glReadPixels</span>. &nbsp;These
3517 Should we support the command <span style="font-weight: bold;">glGetTexEnvi/fv,
3518 glGetTexParameteri/fv</span> and <span style="font-weight: bold;">glGetTexLevelParameteri/fv</span>?<br>
3526 Should we support the commands <span style="font-weight: bold;">glGetIntegerv,
3527 glGetBooleanv </span>and <span style="font-weight: bold;">glGetDoublev</span>
3528 in addition to <span style="font-weight: bold;">glGetFloatv</span>?<br>
3533 style="font-weight: bold;">glGetFloatv</span>. &nbsp;The
3539 Should bitmaps rendered with <span style="font-weight: bold;">glBitmap</span>
3563 Is <span style="font-weight: bold;">glPolygonMode</span> needed?<br>