f15e3b61423dd3c547e57c9447fb2ff242f9eccc
[mesa.git] / src / mesa / main / api_noop.c
1 /* $Id: api_noop.c,v 1.13 2003/05/30 21:37:14 idr Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 5.1
6 *
7 * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
8 *
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 */
26
27
28 #include "glheader.h"
29 #include "api_noop.h"
30 #include "api_validate.h"
31 #include "context.h"
32 #include "colormac.h"
33 #include "light.h"
34 #include "macros.h"
35 #include "mtypes.h"
36
37
38 /* In states where certain vertex components are required for t&l or
39 * rasterization, we still need to keep track of the current values.
40 * These functions provide this service by keeping uptodate the
41 * 'ctx->Current' struct for all data elements not included in the
42 * currently enabled hardware vertex.
43 *
44 */
45 void _mesa_noop_EdgeFlag( GLboolean b )
46 {
47 GET_CURRENT_CONTEXT(ctx);
48 ctx->Current.EdgeFlag = b;
49 }
50
51 void _mesa_noop_EdgeFlagv( const GLboolean *b )
52 {
53 GET_CURRENT_CONTEXT(ctx);
54 ctx->Current.EdgeFlag = *b;
55 }
56
57 void _mesa_noop_FogCoordfEXT( GLfloat a )
58 {
59 GET_CURRENT_CONTEXT(ctx);
60 ctx->Current.Attrib[VERT_ATTRIB_FOG][0] = a;
61 }
62
63 void _mesa_noop_FogCoordfvEXT( const GLfloat *v )
64 {
65 GET_CURRENT_CONTEXT(ctx);
66 ctx->Current.Attrib[VERT_ATTRIB_FOG][0] = *v;
67 }
68
69 void _mesa_noop_Indexi( GLint i )
70 {
71 GET_CURRENT_CONTEXT(ctx);
72 ctx->Current.Index = i;
73 }
74
75 void _mesa_noop_Indexiv( const GLint *v )
76 {
77 GET_CURRENT_CONTEXT(ctx);
78 ctx->Current.Index = *v;
79 }
80
81 void _mesa_noop_Normal3f( GLfloat a, GLfloat b, GLfloat c )
82 {
83 GET_CURRENT_CONTEXT(ctx);
84 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
85 COPY_FLOAT(dest[0], a);
86 COPY_FLOAT(dest[1], b);
87 COPY_FLOAT(dest[2], c);
88 }
89
90 void _mesa_noop_Normal3fv( const GLfloat *v )
91 {
92 GET_CURRENT_CONTEXT(ctx);
93 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_NORMAL];
94 COPY_FLOAT(dest[0], v[0]);
95 COPY_FLOAT(dest[1], v[1]);
96 COPY_FLOAT(dest[2], v[2]);
97 }
98
99 void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
100 {
101 GET_CURRENT_CONTEXT(ctx);
102 struct gl_material mat[2];
103 GLuint bitmask = _mesa_material_bitmask( ctx, face, pname, ~0,
104 "_mesa_noop_Materialfv" );
105 if (bitmask == 0)
106 return;
107
108 if (bitmask & FRONT_AMBIENT_BIT) {
109 COPY_4FV( mat[0].Ambient, params );
110 }
111 if (bitmask & BACK_AMBIENT_BIT) {
112 COPY_4FV( mat[1].Ambient, params );
113 }
114 if (bitmask & FRONT_DIFFUSE_BIT) {
115 COPY_4FV( mat[0].Diffuse, params );
116 }
117 if (bitmask & BACK_DIFFUSE_BIT) {
118 COPY_4FV( mat[1].Diffuse, params );
119 }
120 if (bitmask & FRONT_SPECULAR_BIT) {
121 COPY_4FV( mat[0].Specular, params );
122 }
123 if (bitmask & BACK_SPECULAR_BIT) {
124 COPY_4FV( mat[1].Specular, params );
125 }
126 if (bitmask & FRONT_EMISSION_BIT) {
127 COPY_4FV( mat[0].Emission, params );
128 }
129 if (bitmask & BACK_EMISSION_BIT) {
130 COPY_4FV( mat[1].Emission, params );
131 }
132 if (bitmask & FRONT_SHININESS_BIT) {
133 GLfloat shininess = CLAMP( params[0], 0.0F, ctx->Const.MaxShininess );
134 mat[0].Shininess = shininess;
135 }
136 if (bitmask & BACK_SHININESS_BIT) {
137 GLfloat shininess = CLAMP( params[0], 0.0F, ctx->Const.MaxShininess );
138 mat[1].Shininess = shininess;
139 }
140 if (bitmask & FRONT_INDEXES_BIT) {
141 mat[0].AmbientIndex = params[0];
142 mat[0].DiffuseIndex = params[1];
143 mat[0].SpecularIndex = params[2];
144 }
145 if (bitmask & BACK_INDEXES_BIT) {
146 mat[1].AmbientIndex = params[0];
147 mat[1].DiffuseIndex = params[1];
148 mat[1].SpecularIndex = params[2];
149 }
150
151 _mesa_update_material( ctx, mat, bitmask );
152 }
153
154 void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d )
155 {
156 GET_CURRENT_CONTEXT(ctx);
157 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
158 color[0] = UBYTE_TO_FLOAT(a);
159 color[1] = UBYTE_TO_FLOAT(b);
160 color[2] = UBYTE_TO_FLOAT(c);
161 color[3] = UBYTE_TO_FLOAT(d);
162 }
163
164 void _mesa_noop_Color4ubv( const GLubyte *v )
165 {
166 GET_CURRENT_CONTEXT(ctx);
167 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
168 color[0] = UBYTE_TO_FLOAT(v[0]);
169 color[1] = UBYTE_TO_FLOAT(v[1]);
170 color[2] = UBYTE_TO_FLOAT(v[2]);
171 color[3] = UBYTE_TO_FLOAT(v[3]);
172 }
173
174 void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
175 {
176 GET_CURRENT_CONTEXT(ctx);
177 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
178 color[0] = a;
179 color[1] = b;
180 color[2] = c;
181 color[3] = d;
182 }
183
184 void _mesa_noop_Color4fv( const GLfloat *v )
185 {
186 GET_CURRENT_CONTEXT(ctx);
187 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
188 color[0] = v[0];
189 color[1] = v[1];
190 color[2] = v[2];
191 color[3] = v[3];
192 }
193
194 void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c )
195 {
196 GET_CURRENT_CONTEXT(ctx);
197 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
198 color[0] = UBYTE_TO_FLOAT(a);
199 color[1] = UBYTE_TO_FLOAT(b);
200 color[2] = UBYTE_TO_FLOAT(c);
201 color[3] = 1.0;
202 }
203
204 void _mesa_noop_Color3ubv( const GLubyte *v )
205 {
206 GET_CURRENT_CONTEXT(ctx);
207 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
208 color[0] = UBYTE_TO_FLOAT(v[0]);
209 color[1] = UBYTE_TO_FLOAT(v[1]);
210 color[2] = UBYTE_TO_FLOAT(v[2]);
211 color[3] = 1.0;
212 }
213
214 void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c )
215 {
216 GET_CURRENT_CONTEXT(ctx);
217 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
218 color[0] = a;
219 color[1] = b;
220 color[2] = c;
221 color[3] = 1.0;
222 }
223
224 void _mesa_noop_Color3fv( const GLfloat *v )
225 {
226 GET_CURRENT_CONTEXT(ctx);
227 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
228 color[0] = v[0];
229 color[1] = v[1];
230 color[2] = v[2];
231 color[3] = 1.0;
232 }
233
234 void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a )
235 {
236 GET_CURRENT_CONTEXT(ctx);
237 GLuint unit = target - GL_TEXTURE0_ARB;
238
239 /* unit is unsigned -- cannot be less than zero.
240 */
241 if (unit < MAX_TEXTURE_COORD_UNITS)
242 {
243 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
244 COPY_FLOAT(dest[0], a);
245 dest[1] = 0;
246 dest[2] = 0;
247 dest[3] = 1;
248 }
249 }
250
251 void _mesa_noop_MultiTexCoord1fvARB( GLenum target, const GLfloat *v )
252 {
253 GET_CURRENT_CONTEXT(ctx);
254 GLuint unit = target - GL_TEXTURE0_ARB;
255
256 /* unit is unsigned -- cannot be less than zero.
257 */
258 if (unit < MAX_TEXTURE_COORD_UNITS)
259 {
260 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
261 COPY_FLOAT(dest[0], v[0]);
262 dest[1] = 0;
263 dest[2] = 0;
264 dest[3] = 1;
265 }
266 }
267
268 void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a, GLfloat b )
269 {
270 GET_CURRENT_CONTEXT(ctx);
271 GLuint unit = target - GL_TEXTURE0_ARB;
272
273 /* unit is unsigned -- cannot be less than zero.
274 */
275 if (unit < MAX_TEXTURE_COORD_UNITS)
276 {
277 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
278 COPY_FLOAT(dest[0], a);
279 COPY_FLOAT(dest[1], b);
280 dest[2] = 0;
281 dest[3] = 1;
282 }
283 }
284
285 void _mesa_noop_MultiTexCoord2fvARB( GLenum target, const GLfloat *v )
286 {
287 GET_CURRENT_CONTEXT(ctx);
288 GLuint unit = target - GL_TEXTURE0_ARB;
289
290 /* unit is unsigned -- cannot be less than zero.
291 */
292 if (unit < MAX_TEXTURE_COORD_UNITS)
293 {
294 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
295 COPY_FLOAT(dest[0], v[0]);
296 COPY_FLOAT(dest[1], v[1]);
297 dest[2] = 0;
298 dest[3] = 1;
299 }
300 }
301
302 void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a, GLfloat b, GLfloat c)
303 {
304 GET_CURRENT_CONTEXT(ctx);
305 GLuint unit = target - GL_TEXTURE0_ARB;
306
307 /* unit is unsigned -- cannot be less than zero.
308 */
309 if (unit < MAX_TEXTURE_COORD_UNITS)
310 {
311 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
312 COPY_FLOAT(dest[0], a);
313 COPY_FLOAT(dest[1], b);
314 COPY_FLOAT(dest[2], c);
315 dest[3] = 1;
316 }
317 }
318
319 void _mesa_noop_MultiTexCoord3fvARB( GLenum target, const GLfloat *v )
320 {
321 GET_CURRENT_CONTEXT(ctx);
322 GLuint unit = target - GL_TEXTURE0_ARB;
323
324 /* unit is unsigned -- cannot be less than zero.
325 */
326 if (unit < MAX_TEXTURE_COORD_UNITS)
327 {
328 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
329 COPY_FLOAT(dest[0], v[0]);
330 COPY_FLOAT(dest[1], v[1]);
331 COPY_FLOAT(dest[2], v[2]);
332 dest[3] = 1;
333 }
334 }
335
336 void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a, GLfloat b,
337 GLfloat c, GLfloat d )
338 {
339 GET_CURRENT_CONTEXT(ctx);
340 GLuint unit = target - GL_TEXTURE0_ARB;
341
342 /* unit is unsigned -- cannot be less than zero.
343 */
344 if (unit < MAX_TEXTURE_COORD_UNITS)
345 {
346 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
347 COPY_FLOAT(dest[0], a);
348 COPY_FLOAT(dest[1], b);
349 COPY_FLOAT(dest[2], c);
350 dest[3] = d;
351 }
352 }
353
354 void _mesa_noop_MultiTexCoord4fvARB( GLenum target, const GLfloat *v )
355 {
356 GET_CURRENT_CONTEXT(ctx);
357 GLuint unit = target - GL_TEXTURE0_ARB;
358
359 /* unit is unsigned -- cannot be less than zero.
360 */
361 if (unit < MAX_TEXTURE_COORD_UNITS)
362 {
363 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit];
364 COPY_FLOAT(dest[0], v[0]);
365 COPY_FLOAT(dest[1], v[1]);
366 COPY_FLOAT(dest[2], v[2]);
367 COPY_FLOAT(dest[3], v[3]);
368 }
369 }
370
371 void _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c )
372 {
373 GET_CURRENT_CONTEXT(ctx);
374 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
375 color[0] = UBYTE_TO_FLOAT(a);
376 color[1] = UBYTE_TO_FLOAT(b);
377 color[2] = UBYTE_TO_FLOAT(c);
378 color[3] = 1.0;
379 }
380
381 void _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v )
382 {
383 GET_CURRENT_CONTEXT(ctx);
384 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
385 color[0] = UBYTE_TO_FLOAT(v[0]);
386 color[1] = UBYTE_TO_FLOAT(v[1]);
387 color[2] = UBYTE_TO_FLOAT(v[2]);
388 color[3] = 1.0;
389 }
390
391 void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c )
392 {
393 GET_CURRENT_CONTEXT(ctx);
394 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
395 color[0] = a;
396 color[1] = b;
397 color[2] = c;
398 color[3] = 1.0;
399 }
400
401 void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v )
402 {
403 GET_CURRENT_CONTEXT(ctx);
404 GLfloat *color = ctx->Current.Attrib[VERT_ATTRIB_COLOR1];
405 color[0] = v[0];
406 color[1] = v[1];
407 color[2] = v[2];
408 color[3] = 1.0;
409 }
410
411 void _mesa_noop_TexCoord1f( GLfloat a )
412 {
413 GET_CURRENT_CONTEXT(ctx);
414 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
415 COPY_FLOAT(dest[0], a);
416 dest[1] = 0;
417 dest[2] = 0;
418 dest[3] = 1;
419 }
420
421 void _mesa_noop_TexCoord1fv( const GLfloat *v )
422 {
423 GET_CURRENT_CONTEXT(ctx);
424 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
425 COPY_FLOAT(dest[0], v[0]);
426 dest[1] = 0;
427 dest[2] = 0;
428 dest[3] = 1;
429 }
430
431 void _mesa_noop_TexCoord2f( GLfloat a, GLfloat b )
432 {
433 GET_CURRENT_CONTEXT(ctx);
434 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
435 COPY_FLOAT(dest[0], a);
436 COPY_FLOAT(dest[1], b);
437 dest[2] = 0;
438 dest[3] = 1;
439 }
440
441 void _mesa_noop_TexCoord2fv( const GLfloat *v )
442 {
443 GET_CURRENT_CONTEXT(ctx);
444 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
445 COPY_FLOAT(dest[0], v[0]);
446 COPY_FLOAT(dest[1], v[1]);
447 dest[2] = 0;
448 dest[3] = 1;
449 }
450
451 void _mesa_noop_TexCoord3f( GLfloat a, GLfloat b, GLfloat c )
452 {
453 GET_CURRENT_CONTEXT(ctx);
454 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
455 COPY_FLOAT(dest[0], a);
456 COPY_FLOAT(dest[1], b);
457 COPY_FLOAT(dest[2], c);
458 dest[3] = 1;
459 }
460
461 void _mesa_noop_TexCoord3fv( const GLfloat *v )
462 {
463 GET_CURRENT_CONTEXT(ctx);
464 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
465 COPY_FLOAT(dest[0], v[0]);
466 COPY_FLOAT(dest[1], v[1]);
467 COPY_FLOAT(dest[2], v[2]);
468 dest[3] = 1;
469 }
470
471 void _mesa_noop_TexCoord4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
472 {
473 GET_CURRENT_CONTEXT(ctx);
474 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
475 COPY_FLOAT(dest[0], a);
476 COPY_FLOAT(dest[1], b);
477 COPY_FLOAT(dest[2], c);
478 COPY_FLOAT(dest[3], d);
479 }
480
481 void _mesa_noop_TexCoord4fv( const GLfloat *v )
482 {
483 GET_CURRENT_CONTEXT(ctx);
484 GLfloat *dest = ctx->Current.Attrib[VERT_ATTRIB_TEX0];
485 COPY_FLOAT(dest[0], v[0]);
486 COPY_FLOAT(dest[1], v[1]);
487 COPY_FLOAT(dest[2], v[2]);
488 COPY_FLOAT(dest[3], v[3]);
489 }
490
491 /* Useful outside begin/end?
492 */
493 void _mesa_noop_Vertex2fv( const GLfloat *v )
494 {
495 (void) v;
496 }
497
498 void _mesa_noop_Vertex3fv( const GLfloat *v )
499 {
500 (void) v;
501 }
502
503 void _mesa_noop_Vertex4fv( const GLfloat *v )
504 {
505 (void) v;
506 }
507
508 void _mesa_noop_Vertex2f( GLfloat a, GLfloat b )
509 {
510 (void) a; (void) b;
511 }
512
513 void _mesa_noop_Vertex3f( GLfloat a, GLfloat b, GLfloat c )
514 {
515 (void) a; (void) b; (void) c;
516 }
517
518 void _mesa_noop_Vertex4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d )
519 {
520 (void) a; (void) b; (void) c; (void) d;
521 }
522
523
524
525 void _mesa_noop_VertexAttrib4fNV( GLuint index, GLfloat x,
526 GLfloat y, GLfloat z, GLfloat w )
527 {
528 GET_CURRENT_CONTEXT(ctx);
529 if (index < 16) {
530 ASSIGN_4V(ctx->Current.Attrib[index], x, y, z, w);
531 }
532 }
533
534 void _mesa_noop_VertexAttrib4fvNV( GLuint index, const GLfloat *v )
535 {
536 GET_CURRENT_CONTEXT(ctx);
537 if (index < 16) {
538 ASSIGN_4V(ctx->Current.Attrib[index], v[0], v[1], v[2], v[3]);
539 }
540 }
541
542
543
544 /* Execute a glRectf() function. This is not suitable for GL_COMPILE
545 * modes (as the test for outside begin/end is not compiled),
546 * but may be useful for drivers in circumstances which exclude
547 * display list interactions.
548 *
549 * (None of the functions in this file are suitable for GL_COMPILE
550 * modes).
551 */
552 void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
553 {
554 {
555 GET_CURRENT_CONTEXT(ctx);
556 ASSERT_OUTSIDE_BEGIN_END(ctx);
557 }
558
559 glBegin( GL_QUADS );
560 glVertex2f( x1, y1 );
561 glVertex2f( x2, y1 );
562 glVertex2f( x2, y2 );
563 glVertex2f( x1, y2 );
564 glEnd();
565 }
566
567
568 /* Some very basic support for arrays. Drivers without explicit array
569 * support can hook these in, but still need to supply an array-elt
570 * implementation.
571 */
572 void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count)
573 {
574 GET_CURRENT_CONTEXT(ctx);
575 GLint i;
576
577 if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
578 return;
579
580 glBegin(mode);
581 for (i = start ; i <= count ; i++)
582 glArrayElement( i );
583 glEnd();
584 }
585
586
587 void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
588 const GLvoid *indices)
589 {
590 GET_CURRENT_CONTEXT(ctx);
591 GLint i;
592
593 if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
594 return;
595
596 glBegin(mode);
597
598 switch (type) {
599 case GL_UNSIGNED_BYTE:
600 for (i = 0 ; i < count ; i++)
601 glArrayElement( ((GLubyte *)indices)[i] );
602 break;
603 case GL_UNSIGNED_SHORT:
604 for (i = 0 ; i < count ; i++)
605 glArrayElement( ((GLushort *)indices)[i] );
606 break;
607 case GL_UNSIGNED_INT:
608 for (i = 0 ; i < count ; i++)
609 glArrayElement( ((GLuint *)indices)[i] );
610 break;
611 default:
612 _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
613 break;
614 }
615
616 glEnd();
617 }
618
619 void _mesa_noop_DrawRangeElements(GLenum mode,
620 GLuint start, GLuint end,
621 GLsizei count, GLenum type,
622 const GLvoid *indices)
623 {
624 GET_CURRENT_CONTEXT(ctx);
625
626 if (_mesa_validate_DrawRangeElements( ctx, mode,
627 start, end,
628 count, type, indices ))
629 glDrawElements( mode, count, type, indices );
630 }