source: trunk/src/opengl/mesa/vbfill.c

Last change on this file was 3598, checked in by jeroen, 25 years ago

* empty log message *

File size: 32.2 KB
RevLine 
[3598]1/* $Id: vbfill.c,v 1.3 2000-05-23 20:41:01 jeroen Exp $ */
[2938]2
3/*
4 * Mesa 3-D graphics library
[3598]5 * Version: 3.3
[2938]6 *
7 * Copyright (C) 1999 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
29#ifdef PC_HEADER
30#include "all.h"
31#else
[3598]32#include "glheader.h"
[2962]33#include "types.h"
[2938]34#include "context.h"
35#include "enums.h"
36#include "light.h"
37#include "macros.h"
38#include "matrix.h"
39#include "mmath.h"
40#include "varray.h"
41#include "vb.h"
42#include "vbcull.h"
43#include "vbfill.h"
44#include "vbrender.h"
45#include "vbxform.h"
46#include "xform.h"
[3598]47#include "state.h"
[2938]48#endif
49
50
51
52/* KW: The work of most of the functions which were in this file are
53 * now done directly by the GLVertex, GLTexCoord, GLIndex, ...,
54 * functions in api{1,2}.c. This is made possible by the fact
55 * that display lists and vertex buffers are now built the same
56 * way, so there is no need for the indirection and overhead of a
57 * function pointer.
58 */
59
60
[3598]61void
62_mesa_Begin(GLenum mode )
63{
64 GET_CURRENT_CONTEXT(ctx);
65
66 if (mode > GL_POLYGON) {
67 gl_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
68 return;
69 }
70
71 gl_Begin(ctx, mode);
72}
73
[2938]74void gl_Begin( GLcontext *ctx, GLenum p )
75{
76 struct immediate *IM = ctx->input;
77 GLuint inflags, state;
78
[3598]79 if (MESA_VERBOSE&VERBOSE_API)
80 fprintf(stderr, "glBegin(IM %d) %s\n", IM->id, gl_lookup_enum_by_nr(p));
[2938]81
82 if (ctx->NewState)
[3598]83 gl_update_state( ctx ); /* should already be flushed */
[2938]84
85 /* if only a very few slots left, might as well flush now
86 */
[3598]87 if (IM->Count > VB_MAX-4) {
[2938]88 IM->maybe_transform_vb( IM );
89 IM = ctx->input;
90 }
91
92 state = IM->BeginState;
93 inflags = state & (VERT_BEGIN_0|VERT_BEGIN_1);
[3598]94 state |= inflags << 2; /* set error conditions */
[2938]95
96 if (MESA_VERBOSE&VERBOSE_API)
97 fprintf(stderr, "in gl_Begin(IM %d), BeginState is %x, errors %x",
[3598]98 IM->id,
99 state,
100 inflags<<2);
[2938]101
102 if (inflags != (VERT_BEGIN_0|VERT_BEGIN_1))
103 {
104 GLuint count = IM->Count;
105 GLuint last = IM->LastPrimitive;
106
107 state |= (VERT_BEGIN_0|VERT_BEGIN_1);
108 IM->Flag[count] |= VERT_BEGIN;
109 IM->Primitive[count] = p;
110
111 IM->NextPrimitive[IM->LastPrimitive] = count;
112 IM->LastPrimitive = count;
113
114 if (IM->FlushElt) {
[3598]115 gl_exec_array_elements( ctx, IM, last, count );
116 IM->FlushElt = 0;
[2938]117 }
118 }
119
120 if (MESA_VERBOSE&VERBOSE_API)
121 fprintf(stderr, "in gl_Begin final state %x\n", state);
122
123 IM->BeginState = state;
124}
125
126
[3598]127/* KW: Both streams now go to the outside-begin-end state. Raise
128 * errors for either stream if it was not in the inside state.
129 */
130void
131_mesa_End(void)
132{
133 GLuint state;
134 GLuint inflags;
135 GET_IMMEDIATE;
[2938]136
[3598]137
138 state = IM->BeginState;
139 inflags = (~state) & (VERT_BEGIN_0|VERT_BEGIN_1);
140 state |= inflags << 2; /* errors */
141
142 if (MESA_VERBOSE&VERBOSE_API)
143 fprintf(stderr, "glEnd(IM %d), BeginState is %x, errors %x\n",
144 IM->id, state,
145 inflags<<2);
146
147
148 if (inflags != (VERT_BEGIN_0|VERT_BEGIN_1))
149 {
150 GLuint count = IM->Count;
151 GLuint last = IM->LastPrimitive;
152
153 state &= ~(VERT_BEGIN_0|VERT_BEGIN_1); /* update state */
154 IM->Flag[count] |= VERT_END;
155 IM->NextPrimitive[IM->LastPrimitive] = count;
156 IM->LastPrimitive = count;
157 IM->Primitive[count] = GL_POLYGON+1;
158
159 if (IM->FlushElt) {
160 gl_exec_array_elements( IM->backref, IM, last, count );
161 IM->FlushElt = 0;
162 }
163 }
164
165 if (MESA_VERBOSE&VERBOSE_API)
166 fprintf(stderr, "in glEnd final state %x\n", state);
167
168 IM->BeginState = state;
169
170 if ((MESA_DEBUG_FLAGS&DEBUG_ALWAYS_FLUSH))
171 IM->maybe_transform_vb( IM );
172}
173
174
175void gl_End( GLcontext *ctx )
176{
177 struct immediate *IM = ctx->input;
178 GLuint state = IM->BeginState;
179 GLuint inflags = (~state) & (VERT_BEGIN_0|VERT_BEGIN_1);
180
181 state |= inflags << 2; /* errors */
182
183 if (inflags != (VERT_BEGIN_0|VERT_BEGIN_1))
184 {
185 GLuint count = IM->Count;
186 GLuint last = IM->LastPrimitive;
187
188 state &= ~(VERT_BEGIN_0|VERT_BEGIN_1); /* update state */
189 IM->Flag[count] |= VERT_END;
190 IM->NextPrimitive[IM->LastPrimitive] = count;
191 IM->LastPrimitive = count;
192 IM->Primitive[count] = GL_POLYGON+1;
193
194 if (IM->FlushElt) {
195 gl_exec_array_elements( ctx, IM, last, count );
196 IM->FlushElt = 0;
197 }
198 }
199
200 IM->BeginState = state;
201
202 /* You can set this flag to get the old 'flush vb on glEnd()'
203 * behaviour.
204 */
205 if ((MESA_DEBUG_FLAGS&DEBUG_ALWAYS_FLUSH))
206 IM->maybe_transform_vb( IM );
207}
208
209
210
211
212
213/* KW: Again, a stateless implementation of these functions. The big
214 * news here is the impact on color material. This was previously
215 * handled by swaping the function pointers that these API's used to
216 * call. This is no longer possible, and we have to pick up the
217 * pieces later on and make them work with either color-color, or
218 * color-material.
219 *
220 * But in truth, this is not a bad thing, because it was necessary
221 * to implement that mechanism to get good performance from
222 * color-material and vertex arrays.
223 */
224#define COLOR( IM, r,g,b,a ) \
225{ \
226 GLuint count = IM->Count; \
227 IM->Flag[count] |= VERT_RGBA; \
228 IM->Color[count][0] = r; \
229 IM->Color[count][1] = g; \
230 IM->Color[count][2] = b; \
231 IM->Color[count][3] = a; \
232}
233
234#define COLORV( IM, v ) \
235{ \
236 GLuint count = IM->Count; \
237 IM->Flag[count] |= VERT_RGBA; \
238 COPY_4UBV(IM->Color[count], v); \
239}
240
241
242void
243_mesa_Color3b(GLbyte red, GLbyte green, GLbyte blue )
244{
245 GET_IMMEDIATE;
246 COLOR( IM,
247 BYTE_TO_UBYTE(red),
248 BYTE_TO_UBYTE(green),
249 BYTE_TO_UBYTE(blue),
250 255 );
251}
252
253
254void
255_mesa_Color3d(GLdouble red, GLdouble green, GLdouble blue )
256{
257 GLubyte col[4];
258 GLfloat r = red;
259 GLfloat g = green;
260 GLfloat b = blue;
261 GET_IMMEDIATE;
262 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], r);
263 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], g);
264 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], b);
265 col[3] = 255;
266 COLORV( IM, col );
267}
268
269
270void
271_mesa_Color3f(GLfloat red, GLfloat green, GLfloat blue )
272{
273 GLubyte col[4];
274 GET_IMMEDIATE;
275 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], red);
276 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], green);
277 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], blue);
278 col[3] = 255;
279 COLORV( IM, col );
280}
281
282
283void
284_mesa_Color3i(GLint red, GLint green, GLint blue )
285{
286 GET_IMMEDIATE;
287 COLOR( IM, INT_TO_UBYTE(red),
288 INT_TO_UBYTE(green),
289 INT_TO_UBYTE(blue),
290 255);
291}
292
293
294void
295_mesa_Color3s(GLshort red, GLshort green, GLshort blue )
296{
297 GET_IMMEDIATE;
298 COLOR( IM, SHORT_TO_UBYTE(red),
299 SHORT_TO_UBYTE(green),
300 SHORT_TO_UBYTE(blue),
301 255);
302}
303
304
305void
306_mesa_Color3ub(GLubyte red, GLubyte green, GLubyte blue )
307{
308 GET_IMMEDIATE;
309 COLOR( IM, red, green, blue, 255 );
310}
311
312
313void
314_mesa_Color3ui(GLuint red, GLuint green, GLuint blue )
315{
316 GET_IMMEDIATE;
317 COLOR( IM, UINT_TO_UBYTE(red),
318 UINT_TO_UBYTE(green),
319 UINT_TO_UBYTE(blue),
320 255 );
321}
322
323
324void
325_mesa_Color3us(GLushort red, GLushort green, GLushort blue )
326{
327 GET_IMMEDIATE;
328 COLOR( IM, USHORT_TO_UBYTE(red), USHORT_TO_UBYTE(green),
329 USHORT_TO_UBYTE(blue),
330 255 );
331}
332
333
334void
335_mesa_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha )
336{
337 GET_IMMEDIATE;
338 COLOR( IM, BYTE_TO_UBYTE(red), BYTE_TO_UBYTE(green),
339 BYTE_TO_UBYTE(blue), BYTE_TO_UBYTE(alpha) );
340}
341
342
343void
344_mesa_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha )
345{
346 GLubyte col[4];
347 GLfloat r = red;
348 GLfloat g = green;
349 GLfloat b = blue;
350 GLfloat a = alpha;
351 GET_IMMEDIATE;
352 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], r);
353 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], g);
354 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], b);
355 FLOAT_COLOR_TO_UBYTE_COLOR(col[3], a);
356 COLORV( IM, col );
357}
358
359
360void
361_mesa_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
362{
363 GLubyte col[4];
364 GET_IMMEDIATE;
365 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], red);
366 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], green);
367 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], blue);
368 FLOAT_COLOR_TO_UBYTE_COLOR(col[3], alpha);
369 COLORV( IM, col );
370}
371
372
373void
374_mesa_Color4i(GLint red, GLint green, GLint blue, GLint alpha )
375{
376 GET_IMMEDIATE;
377 COLOR( IM, INT_TO_UBYTE(red), INT_TO_UBYTE(green),
378 INT_TO_UBYTE(blue), INT_TO_UBYTE(alpha) );
379}
380
381
382void
383_mesa_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha )
384{
385 GET_IMMEDIATE;
386 COLOR( IM, SHORT_TO_UBYTE(red), SHORT_TO_UBYTE(green),
387 SHORT_TO_UBYTE(blue), SHORT_TO_UBYTE(alpha) );
388}
389
390void
391_mesa_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
392{
393 GET_IMMEDIATE;
394 COLOR( IM, red, green, blue, alpha );
395}
396
397void
398_mesa_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha )
399{
400 GET_IMMEDIATE;
401 COLOR( IM, UINT_TO_UBYTE(red), UINT_TO_UBYTE(green),
402 UINT_TO_UBYTE(blue), UINT_TO_UBYTE(alpha) );
403}
404
405void
406_mesa_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha )
407{
408 GET_IMMEDIATE;
409 COLOR( IM, USHORT_TO_UBYTE(red), USHORT_TO_UBYTE(green),
410 USHORT_TO_UBYTE(blue), USHORT_TO_UBYTE(alpha) );
411}
412
413
414void
415_mesa_Color3bv(const GLbyte *v )
416{
417 GET_IMMEDIATE;
418 COLOR( IM, BYTE_TO_UBYTE(v[0]), BYTE_TO_UBYTE(v[1]),
419 BYTE_TO_UBYTE(v[2]), 255 );
420}
421
422
423void
424_mesa_Color3dv(const GLdouble *v )
425{
426 GLubyte col[4];
427 GLfloat r = v[0];
428 GLfloat g = v[1];
429 GLfloat b = v[2];
430 GET_IMMEDIATE;
431 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], r);
432 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], g);
433 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], b);
434 col[3]= 255;
435 COLORV( IM, col );
436}
437
438
439void
440_mesa_Color3fv(const GLfloat *v )
441{
442 GLubyte col[4];
443 GET_IMMEDIATE;
444 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], v[0]);
445 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], v[1]);
446 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], v[2]);
447 col[3] = 255;
448 COLORV( IM, col );
449}
450
451
452void
453_mesa_Color3iv(const GLint *v )
454{
455 GET_IMMEDIATE;
456 COLOR( IM, INT_TO_UBYTE(v[0]), INT_TO_UBYTE(v[1]),
457 INT_TO_UBYTE(v[2]), 255 );
458}
459
460
461void
462_mesa_Color3sv(const GLshort *v )
463{
464 GET_IMMEDIATE;
465 COLOR( IM, SHORT_TO_UBYTE(v[0]), SHORT_TO_UBYTE(v[1]),
466 SHORT_TO_UBYTE(v[2]), 255 );
467}
468
469
470void
471_mesa_Color3ubv(const GLubyte *v )
472{
473 GET_IMMEDIATE;
474 COLOR( IM, v[0], v[1], v[2], 255 );
475}
476
477
478void
479_mesa_Color3uiv(const GLuint *v )
480{
481 GET_IMMEDIATE;
482 COLOR( IM, UINT_TO_UBYTE(v[0]), UINT_TO_UBYTE(v[1]),
483 UINT_TO_UBYTE(v[2]), 255 );
484}
485
486
487void
488_mesa_Color3usv(const GLushort *v )
489{
490 GET_IMMEDIATE;
491 COLOR( IM, USHORT_TO_UBYTE(v[0]), USHORT_TO_UBYTE(v[1]),
492 USHORT_TO_UBYTE(v[2]), 255 );
493
494}
495
496
497void
498_mesa_Color4bv(const GLbyte *v )
499{
500 GET_IMMEDIATE;
501 COLOR( IM, BYTE_TO_UBYTE(v[0]), BYTE_TO_UBYTE(v[1]),
502 BYTE_TO_UBYTE(v[2]), BYTE_TO_UBYTE(v[3]) );
503}
504
505
506void
507_mesa_Color4dv(const GLdouble *v )
508{
509 GLubyte col[4];
510 GLfloat r = v[0];
511 GLfloat g = v[1];
512 GLfloat b = v[2];
513 GLfloat a = v[3];
514 GET_IMMEDIATE;
515 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], r);
516 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], g);
517 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], b);
518 FLOAT_COLOR_TO_UBYTE_COLOR(col[3], a);
519 COLORV( IM, col );
520}
521
522
523void
524_mesa_Color4fv(const GLfloat *v )
525{
526 GLubyte col[4];
527 GET_IMMEDIATE;
528 FLOAT_COLOR_TO_UBYTE_COLOR(col[0], v[0]);
529 FLOAT_COLOR_TO_UBYTE_COLOR(col[1], v[1]);
530 FLOAT_COLOR_TO_UBYTE_COLOR(col[2], v[2]);
531 FLOAT_COLOR_TO_UBYTE_COLOR(col[3], v[3]);
532 COLORV( IM, col );
533}
534
535
536void
537_mesa_Color4iv(const GLint *v )
538{
539 GET_IMMEDIATE;
540 COLOR( IM, INT_TO_UBYTE(v[0]), INT_TO_UBYTE(v[1]),
541 INT_TO_UBYTE(v[2]), INT_TO_UBYTE(v[3]) );
542}
543
544
545void
546_mesa_Color4sv(const GLshort *v)
547{
548 GET_IMMEDIATE;
549 COLOR( IM, SHORT_TO_UBYTE(v[0]), SHORT_TO_UBYTE(v[1]),
550 SHORT_TO_UBYTE(v[2]), SHORT_TO_UBYTE(v[3]) );
551}
552
553
554void
555_mesa_Color4ubv(const GLubyte *v)
556{
557 GET_IMMEDIATE;
558 COLORV( IM, v );
559}
560
561
562void
563_mesa_Color4uiv(const GLuint *v)
564{
565 GET_IMMEDIATE;
566 COLOR( IM, UINT_TO_UBYTE(v[0]), UINT_TO_UBYTE(v[1]),
567 UINT_TO_UBYTE(v[2]), UINT_TO_UBYTE(v[3]) );
568}
569
570
571void
572_mesa_Color4usv(const GLushort *v)
573{
574 GET_IMMEDIATE;
575 COLOR( IM, USHORT_TO_UBYTE(v[0]), USHORT_TO_UBYTE(v[1]),
576 USHORT_TO_UBYTE(v[2]), USHORT_TO_UBYTE(v[3]) );
577}
578
579
580
581
582void
583_mesa_EdgeFlag( GLboolean flag )
584{
585 GLuint count;
586 GET_IMMEDIATE;
587 count = IM->Count;
588 IM->EdgeFlag[count] = flag;
589 IM->Flag[count] |= VERT_EDGE;
590}
591
592
593void
594_mesa_EdgeFlagv( const GLboolean *flag )
595{
596 GLuint count;
597 GET_IMMEDIATE;
598 count = IM->Count;
599 IM->EdgeFlag[count] = *flag;
600 IM->Flag[count] |= VERT_EDGE;
601}
602
603
604
605#define INDEX( c ) \
606{ \
607 GLuint count; \
608 GET_IMMEDIATE; \
609 count = IM->Count; \
610 IM->Index[count] = c; \
611 IM->Flag[count] |= VERT_INDEX; \
612}
613
614
615void
616_mesa_Indexd( GLdouble c )
617{
618 INDEX( (GLuint) (GLint) c );
619}
620
621
622void
623_mesa_Indexf( GLfloat c )
624{
625 INDEX( (GLuint) (GLint) c );
626}
627
628
629void
630_mesa_Indexi( GLint c )
631{
632 INDEX( (GLuint) c );
633}
634
635
636void
637_mesa_Indexs( GLshort c )
638{
639 INDEX( (GLuint) c );
640}
641
642
643void
644_mesa_Indexub( GLubyte c )
645{
646 INDEX( (GLuint) c );
647}
648
649
650void
651_mesa_Indexdv( const GLdouble *c )
652{
653 INDEX( (GLuint) (GLint) *c );
654}
655
656
657void
658_mesa_Indexfv( const GLfloat *c )
659{
660 INDEX( (GLuint) (GLint) *c );
661}
662
663
664void
665_mesa_Indexiv( const GLint *c )
666{
667 INDEX( *c );
668}
669
670
671void
672_mesa_Indexsv( const GLshort *c )
673{
674 INDEX( (GLuint) (GLint) *c );
675}
676
677
678void
679_mesa_Indexubv( const GLubyte *c )
680{
681 INDEX( (GLuint) *c );
682}
683
684
685
686
687
688/* KW: Now that we build buffers for display lists the same way we
689 * fill the vb, we can do the work here without a second function
690 * call. The Flag member allows the identification of missing
691 * (ie shared) normals.
692 */
693#define NORMAL( x,y,z ) \
694{ \
695 GLuint count; \
696 GLfloat *normal; \
697 GET_IMMEDIATE; \
698 count = IM->Count; \
699 IM->Flag[count] |= VERT_NORM; \
700 normal = IM->Normal[count]; \
701 ASSIGN_3V(normal, x,y,z); \
702}
703
704
705void
706_mesa_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz )
707{
708 NORMAL( BYTE_TO_FLOAT(nx), BYTE_TO_FLOAT(ny), BYTE_TO_FLOAT(nz) );
709}
710
711
712void
713_mesa_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
714{
715 NORMAL(nx, ny, nz);
716}
717
718
719void
720_mesa_Normal3f( GLfloat nx, GLfloat ny, GLfloat nz )
721{
722 NORMAL(nx, ny, nz);
723}
724
725
726void
727_mesa_Normal3i( GLint nx, GLint ny, GLint nz )
728{
729 NORMAL( INT_TO_FLOAT(nx), INT_TO_FLOAT(ny), INT_TO_FLOAT(nz) );
730}
731
732
733void
734_mesa_Normal3s( GLshort nx, GLshort ny, GLshort nz )
735{
736 NORMAL( SHORT_TO_FLOAT(nx), SHORT_TO_FLOAT(ny), SHORT_TO_FLOAT(nz) );
737}
738
739
740void
741_mesa_Normal3bv( const GLbyte *v )
742{
743 NORMAL( BYTE_TO_FLOAT(v[0]), BYTE_TO_FLOAT(v[1]), BYTE_TO_FLOAT(v[2]) );
744}
745
746
747void
748_mesa_Normal3dv( const GLdouble *v )
749{
750 NORMAL( v[0], v[1], v[2] );
751}
752
753
754void
755_mesa_Normal3fv( const GLfloat *v )
756{
757 NORMAL( v[0], v[1], v[2] );
758}
759
760
761void
762_mesa_Normal3iv( const GLint *v )
763{
764 NORMAL( INT_TO_FLOAT(v[0]), INT_TO_FLOAT(v[1]), INT_TO_FLOAT(v[2]) );
765}
766
767
768void
769_mesa_Normal3sv( const GLshort *v )
770{
771 NORMAL( SHORT_TO_FLOAT(v[0]), SHORT_TO_FLOAT(v[1]), SHORT_TO_FLOAT(v[2]) );
772}
773
774
775
776
777
778#define TEXCOORD1(s) \
779{ \
780 GLuint count; \
781 GLfloat *tc; \
782 GET_IMMEDIATE; \
783 count = IM->Count; \
784 IM->Flag[count] |= VERT_TEX0_1; \
785 tc = IM->TexCoord[0][count]; \
786 ASSIGN_4V(tc,s,0,0,1); \
787}
788
789#define TEXCOORD2(s,t) \
790{ \
791 GLuint count; \
792 GLfloat *tc; \
793 GET_IMMEDIATE; \
794 count = IM->Count; \
795 IM->Flag[count] |= VERT_TEX0_12; \
796 tc = IM->TexCoord[0][count]; \
797 ASSIGN_4V(tc, s,t,0,1); \
798}
799
800#define TEXCOORD3(s,t,u) \
801{ \
802 GLuint count; \
803 GLfloat *tc; \
804 GET_IMMEDIATE; \
805 count = IM->Count; \
806 IM->Flag[count] |= VERT_TEX0_123; \
807 tc = IM->TexCoord[0][count]; \
808 ASSIGN_4V(tc, s,t,u,1); \
809}
810
811#define TEXCOORD4(s,t,u,v) \
812{ \
813 GLuint count; \
814 GLfloat *tc; \
815 GET_IMMEDIATE; \
816 count = IM->Count; \
817 IM->Flag[count] |= VERT_TEX0_1234; \
818 tc = IM->TexCoord[0][count]; \
819 ASSIGN_4V(tc, s,t,u,v); \
820}
821
822
823void
824_mesa_TexCoord1d( GLdouble s )
825{
826 TEXCOORD1(s);
827}
828
829
830void
831_mesa_TexCoord1f( GLfloat s )
832{
833 TEXCOORD1(s);
834}
835
836
837void
838_mesa_TexCoord1i( GLint s )
839{
840 TEXCOORD1(s);
841}
842
843
844void
845_mesa_TexCoord1s( GLshort s )
846{
847 TEXCOORD1(s);
848}
849
850
851void
852_mesa_TexCoord2d( GLdouble s, GLdouble t )
853{
854 TEXCOORD2(s,t);
855}
856
857
858void
859_mesa_TexCoord2f( GLfloat s, GLfloat t )
860{
861 TEXCOORD2(*(&s),*&t);
862}
863
864
865void
866_mesa_TexCoord2s( GLshort s, GLshort t )
867{
868 TEXCOORD2(s,t);
869}
870
871
872void
873_mesa_TexCoord2i( GLint s, GLint t )
874{
875 TEXCOORD2(s,t);
876}
877
878
879void
880_mesa_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
881{
882 TEXCOORD3(s,t,r);
883}
884
885
886void
887_mesa_TexCoord3f( GLfloat s, GLfloat t, GLfloat r )
888{
889 TEXCOORD3(s,t,r);
890}
891
892
893void
894_mesa_TexCoord3i( GLint s, GLint t, GLint r )
895{
896 TEXCOORD3(s,t,r);
897}
898
899
900void
901_mesa_TexCoord3s( GLshort s, GLshort t, GLshort r )
902{
903 TEXCOORD3(s,t,r);
904}
905
906
907void
908_mesa_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
909{
910 TEXCOORD4(s,t,r,q)
911}
912
913
914void
915_mesa_TexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q )
916{
917 TEXCOORD4(s,t,r,q)
918}
919
920
921void
922_mesa_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
923{
924 TEXCOORD4(s,t,r,q)
925}
926
927
928void
929_mesa_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
930{
931 TEXCOORD4(s,t,r,q)
932}
933
934
935void
936_mesa_TexCoord1dv( const GLdouble *v )
937{
938 TEXCOORD1(v[0]);
939}
940
941
942void
943_mesa_TexCoord1fv( const GLfloat *v )
944{
945 TEXCOORD1(v[0]);
946}
947
948
949void
950_mesa_TexCoord1iv( const GLint *v )
951{
952 TEXCOORD1(v[0]);
953}
954
955
956void
957_mesa_TexCoord1sv( const GLshort *v )
958{
959 TEXCOORD1(v[0]);
960}
961
962
963void
964_mesa_TexCoord2dv( const GLdouble *v )
965{
966 TEXCOORD2(v[0],v[1]);
967}
968
969
970void
971_mesa_TexCoord2fv( const GLfloat *v )
972{
973 TEXCOORD2(v[0],v[1]);
974}
975
976
977void
978_mesa_TexCoord2iv( const GLint *v )
979{
980 TEXCOORD2(v[0],v[1]);
981}
982
983
984void
985_mesa_TexCoord2sv( const GLshort *v )
986{
987 TEXCOORD2(v[0],v[1]);
988}
989
990
991void
992_mesa_TexCoord3dv( const GLdouble *v )
993{
994 TEXCOORD2(v[0],v[1]);
995}
996
997
998void
999_mesa_TexCoord3fv( const GLfloat *v )
1000{
1001 TEXCOORD3(v[0],v[1],v[2]);
1002}
1003
1004
1005void
1006_mesa_TexCoord3iv( const GLint *v )
1007{
1008 TEXCOORD3(v[0],v[1],v[2]);
1009}
1010
1011
1012void
1013_mesa_TexCoord3sv( const GLshort *v )
1014{
1015 TEXCOORD3(v[0],v[1],v[2]);
1016}
1017
1018
1019void
1020_mesa_TexCoord4dv( const GLdouble *v )
1021{
1022 TEXCOORD4(v[0],v[1],v[2],v[3]);
1023}
1024
1025
1026void
1027_mesa_TexCoord4fv( const GLfloat *v )
1028{
1029 TEXCOORD4(v[0],v[1],v[2],v[3]);
1030}
1031
1032
1033void
1034_mesa_TexCoord4iv( const GLint *v )
1035{
1036 TEXCOORD4(v[0],v[1],v[2],v[3]);
1037}
1038
1039
1040void
1041_mesa_TexCoord4sv( const GLshort *v )
1042{
1043 TEXCOORD4(v[0],v[1],v[2],v[3]);
1044}
1045
1046
1047
1048
1049
1050/* KW: Run into bad problems in reset_vb/fixup_input if we don't fully pad
1051 * the incoming vertices.
1052 */
1053#define VERTEX2(IM, x,y) \
1054{ \
1055 GLuint count = IM->Count++; \
1056 GLfloat *dest = IM->Obj[count]; \
1057 IM->Flag[count] |= VERT_OBJ_2; \
1058 ASSIGN_4V(dest, x, y, 0, 1); \
1059 if (dest == IM->Obj[VB_MAX-1]) \
1060 IM->maybe_transform_vb( IM ); \
1061}
1062
1063#define VERTEX3(IM,x,y,z) \
1064{ \
1065 GLuint count = IM->Count++; \
1066 GLfloat *dest = IM->Obj[count]; \
1067 IM->Flag[count] |= VERT_OBJ_23; \
1068 ASSIGN_4V(dest, x, y, z, 1); \
1069 if (dest == IM->Obj[VB_MAX-1]) \
1070 IM->maybe_transform_vb( IM ); \
1071}
1072
1073#define VERTEX4(IM, x,y,z,w) \
1074{ \
1075 GLuint count = IM->Count++; \
1076 GLfloat *dest = IM->Obj[count]; \
1077 IM->Flag[count] |= VERT_OBJ_234; \
1078 ASSIGN_4V(dest, x, y, z, w); \
1079 if (dest == IM->Obj[VB_MAX-1]) \
1080 IM->maybe_transform_vb( IM ); \
1081}
1082
1083
1084void
1085_mesa_Vertex2d( GLdouble x, GLdouble y )
1086{
1087 GET_IMMEDIATE;
1088 VERTEX2( IM, (GLfloat) x, (GLfloat) y );
1089}
1090
1091
1092void
1093_mesa_Vertex2f( GLfloat x, GLfloat y )
1094{
1095 GET_IMMEDIATE;
1096 VERTEX2( IM, *(&x), *(&y) );
1097}
1098
1099
1100/* Internal use:
1101 */
1102void gl_Vertex2f( GLcontext *ctx, GLfloat x, GLfloat y )
1103{
1104 struct immediate *im = ctx->input;
1105 VERTEX2( im, x, y );
1106}
1107
1108
1109void
1110_mesa_Vertex2i( GLint x, GLint y )
1111{
1112 GET_IMMEDIATE;
1113 VERTEX2( IM, (GLfloat) x, (GLfloat) y );
1114}
1115
1116
1117void
1118_mesa_Vertex2s( GLshort x, GLshort y )
1119{
1120 GET_IMMEDIATE;
1121 VERTEX2( IM, (GLfloat) x, (GLfloat) y );
1122}
1123
1124
1125void
1126_mesa_Vertex3d( GLdouble x, GLdouble y, GLdouble z )
1127{
1128 GET_IMMEDIATE;
1129 VERTEX3( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z );
1130}
1131
1132
1133void
1134_mesa_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
1135{
1136 GET_IMMEDIATE;
1137 VERTEX3( IM, *(&x), *(&y), *(&z) );
1138}
1139
1140
1141void
1142_mesa_Vertex3i( GLint x, GLint y, GLint z )
1143{
1144 GET_IMMEDIATE;
1145 VERTEX3( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z );
1146}
1147
1148
1149void
1150_mesa_Vertex3s( GLshort x, GLshort y, GLshort z )
1151{
1152 GET_IMMEDIATE;
1153 VERTEX3( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z );
1154}
1155
1156
1157void
1158_mesa_Vertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w )
1159{
1160 GET_IMMEDIATE;
1161 VERTEX4( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
1162}
1163
1164
1165void
1166_mesa_Vertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
1167{
1168 GET_IMMEDIATE;
1169 VERTEX4( IM, *(&x), *(&y), *(&z), *(&w) );
1170}
1171
1172
1173void
1174_mesa_Vertex4i( GLint x, GLint y, GLint z, GLint w )
1175{
1176 GET_IMMEDIATE;
1177 VERTEX4( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
1178}
1179
1180
1181void
1182_mesa_Vertex4s( GLshort x, GLshort y, GLshort z, GLshort w )
1183{
1184 GET_IMMEDIATE;
1185 VERTEX4( IM, (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
1186}
1187
1188
1189void
1190_mesa_Vertex2dv( const GLdouble *v )
1191{
1192 GET_IMMEDIATE;
1193 VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
1194}
1195
1196
1197void
1198_mesa_Vertex2fv( const GLfloat *v )
1199{
1200 GET_IMMEDIATE;
1201 VERTEX2( IM, v[0], v[1] );
1202}
1203
1204
1205void
1206_mesa_Vertex2iv( const GLint *v )
1207{
1208 GET_IMMEDIATE;
1209 VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
1210}
1211
1212
1213void
1214_mesa_Vertex2sv( const GLshort *v )
1215{
1216 GET_IMMEDIATE;
1217 VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
1218}
1219
1220
1221void
1222_mesa_Vertex3dv( const GLdouble *v )
1223{
1224 GET_IMMEDIATE;
1225 VERTEX3( IM, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1226}
1227
1228
1229void
1230_mesa_Vertex3fv( const GLfloat *v )
1231{
1232 GET_IMMEDIATE;
1233 VERTEX3( IM, v[0], v[1], v[2] );
1234}
1235
1236
1237void
1238_mesa_Vertex3iv( const GLint *v )
1239{
1240 GET_IMMEDIATE;
1241 VERTEX3( IM, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1242}
1243
1244
1245void
1246_mesa_Vertex3sv( const GLshort *v )
1247{
1248 GET_IMMEDIATE;
1249 VERTEX3( IM, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] );
1250}
1251
1252
1253void
1254_mesa_Vertex4dv( const GLdouble *v )
1255{
1256 GET_IMMEDIATE;
1257 VERTEX4( IM,
1258 (GLfloat) v[0], (GLfloat) v[1],
1259 (GLfloat) v[2], (GLfloat) v[3] );
1260}
1261
1262
1263void
1264_mesa_Vertex4fv( const GLfloat *v )
1265{
1266 GET_IMMEDIATE;
1267 VERTEX4( IM, v[0], v[1], v[2], v[3] );
1268}
1269
1270
1271void
1272_mesa_Vertex4iv( const GLint *v )
1273{
1274 GET_IMMEDIATE;
1275 VERTEX4( IM,
1276 (GLfloat) v[0], (GLfloat) v[1],
1277 (GLfloat) v[2], (GLfloat) v[3] );
1278}
1279
1280
1281void
1282_mesa_Vertex4sv( const GLshort *v )
1283{
1284 GET_IMMEDIATE;
1285 VERTEX4( IM,
1286 (GLfloat) v[0], (GLfloat) v[1],
1287 (GLfloat) v[2], (GLfloat) v[3] );
1288}
1289
1290
1291
1292
1293/* KW: Do the check here so that we only have to do a single range
1294 * test. The possible compliance problem with this is that we
1295 * will throw out error-producing calls when compiling display
1296 * lists. The solution is to do dispatch on gl_error to call
1297 * gl_save_error if compiling.
1298 */
1299
1300
1301/*
1302 * GL_ARB_multitexture
1303 */
1304
1305#define CHECK_ARB \
1306 if (target >= GL_TEXTURE0_ARB && target <= GL_TEXTURE1_ARB) { \
1307 texSet = target - GL_TEXTURE0_ARB; \
1308 } \
1309 else { \
1310 gl_error(IM->backref, GL_INVALID_ENUM, \
1311 "glMultiTexCoord(target)"); \
1312 return; \
1313 }
1314
1315
1316#define MULTI_TEXCOORD1(s) \
1317{ \
1318 GLuint count; \
1319 GLfloat *tc; \
1320 count = IM->Count; \
1321 IM->Flag[count] |= IM->TF1[texSet]; \
1322 tc = IM->TexCoordPtr[texSet][count]; \
1323 ASSIGN_4V(tc, s,0,0,1); \
1324}
1325
1326
1327#define MULTI_TEXCOORD2(s,t) \
1328{ \
1329 GLuint count; \
1330 GLfloat *tc; \
1331 count = IM->Count; \
1332 IM->Flag[count] |= IM->TF2[texSet]; \
1333 tc = IM->TexCoordPtr[texSet][count]; \
1334 ASSIGN_4V(tc, s,t,0,1); \
1335}
1336
1337#define MULTI_TEXCOORD3(s,t,u) \
1338{ \
1339 GLuint count; \
1340 GLfloat *tc; \
1341 count = IM->Count; \
1342 IM->Flag[count] |= IM->TF3[texSet]; \
1343 tc = IM->TexCoordPtr[texSet][count]; \
1344 ASSIGN_4V(tc, s,t,u,1); \
1345}
1346
1347#define MULTI_TEXCOORD4(s,t,u,v) \
1348{ \
1349 GLuint count; \
1350 GLfloat *tc; \
1351 count = IM->Count; \
1352 IM->Flag[count] |= IM->TF4[texSet]; \
1353 tc = IM->TexCoordPtr[texSet][count]; \
1354 ASSIGN_4V(tc, s,t,u,v); \
1355}
1356
1357
1358void
1359_mesa_MultiTexCoord1dARB(GLenum target, GLdouble s)
1360{
1361 GLint texSet;
1362 GET_IMMEDIATE;
1363 CHECK_ARB
1364 MULTI_TEXCOORD1( s );
1365}
1366
1367void
1368_mesa_MultiTexCoord1dvARB(GLenum target, const GLdouble *v)
1369{
1370 GLint texSet;
1371 GET_IMMEDIATE;
1372 CHECK_ARB
1373 MULTI_TEXCOORD1( v[0] );
1374}
1375
1376void
1377_mesa_MultiTexCoord1fARB(GLenum target, GLfloat s)
1378{
1379 GLint texSet;
1380 GET_IMMEDIATE;
1381 CHECK_ARB
1382 MULTI_TEXCOORD1( s );
1383}
1384
1385void
1386_mesa_MultiTexCoord1fvARB(GLenum target, const GLfloat *v)
1387{
1388 GLint texSet;
1389 GET_IMMEDIATE;
1390 CHECK_ARB
1391 MULTI_TEXCOORD1( v[0] );
1392}
1393
1394void
1395_mesa_MultiTexCoord1iARB(GLenum target, GLint s)
1396{
1397 GLint texSet;
1398 GET_IMMEDIATE;
1399 CHECK_ARB
1400 MULTI_TEXCOORD1( s );
1401}
1402
1403void
1404_mesa_MultiTexCoord1ivARB(GLenum target, const GLint *v)
1405{
1406 GLint texSet;
1407 GET_IMMEDIATE;
1408 CHECK_ARB
1409 MULTI_TEXCOORD1( v[0] );
1410}
1411
1412void
1413_mesa_MultiTexCoord1sARB(GLenum target, GLshort s)
1414{
1415 GLint texSet;
1416 GET_IMMEDIATE;
1417 CHECK_ARB
1418 MULTI_TEXCOORD1( s );
1419}
1420
1421void
1422_mesa_MultiTexCoord1svARB(GLenum target, const GLshort *v)
1423{
1424 GLint texSet;
1425 GET_IMMEDIATE;
1426 CHECK_ARB
1427 MULTI_TEXCOORD1( v[0] );
1428}
1429
1430void
1431_mesa_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
1432{
1433 GLint texSet;
1434 GET_IMMEDIATE;
1435 CHECK_ARB
1436 MULTI_TEXCOORD2( s, t );
1437}
1438
1439void
1440_mesa_MultiTexCoord2dvARB(GLenum target, const GLdouble *v)
1441{
1442 GLint texSet;
1443 GET_IMMEDIATE;
1444 CHECK_ARB
1445 MULTI_TEXCOORD2( v[0], v[1] );
1446}
1447
1448void
1449_mesa_MultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
1450{
1451 GLint texSet;
1452 GET_IMMEDIATE;
1453 CHECK_ARB
1454 MULTI_TEXCOORD2( s, t );
1455}
1456
1457void
1458_mesa_MultiTexCoord2fvARB(GLenum target, const GLfloat *v)
1459{
1460 GLint texSet;
1461 GET_IMMEDIATE;
1462 CHECK_ARB
1463 MULTI_TEXCOORD2( v[0], v[1] );
1464}
1465
1466void
1467_mesa_MultiTexCoord2iARB(GLenum target, GLint s, GLint t)
1468{
1469 GLint texSet;
1470 GET_IMMEDIATE;
1471 CHECK_ARB
1472 MULTI_TEXCOORD2( s, t );
1473}
1474
1475void
1476_mesa_MultiTexCoord2ivARB(GLenum target, const GLint *v)
1477{
1478 GLint texSet;
1479 GET_IMMEDIATE;
1480 CHECK_ARB
1481 MULTI_TEXCOORD2( v[0], v[1] );
1482}
1483
1484void
1485_mesa_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
1486{
1487 GLint texSet;
1488 GET_IMMEDIATE;
1489 CHECK_ARB
1490 MULTI_TEXCOORD2( s, t );
1491}
1492
1493void
1494_mesa_MultiTexCoord2svARB(GLenum target, const GLshort *v)
1495{
1496 GLint texSet;
1497 GET_IMMEDIATE;
1498 CHECK_ARB
1499 MULTI_TEXCOORD2( v[0], v[1] );
1500}
1501
1502void
1503_mesa_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
1504{
1505 GLint texSet;
1506 GET_IMMEDIATE;
1507 CHECK_ARB
1508 MULTI_TEXCOORD3( s, t, r );
1509}
1510
1511void
1512_mesa_MultiTexCoord3dvARB(GLenum target, const GLdouble *v)
1513{
1514 GLint texSet;
1515 GET_IMMEDIATE;
1516 CHECK_ARB
1517 MULTI_TEXCOORD3( v[0], v[1], v[2] );
1518}
1519
1520void
1521_mesa_MultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
1522{
1523 GLint texSet;
1524 GET_IMMEDIATE;
1525 CHECK_ARB
1526 MULTI_TEXCOORD3( s, t, r );
1527}
1528
1529void
1530_mesa_MultiTexCoord3fvARB(GLenum target, const GLfloat *v)
1531{
1532 GLint texSet;
1533 GET_IMMEDIATE;
1534 CHECK_ARB
1535 MULTI_TEXCOORD3( v[0], v[1], v[2] );
1536}
1537
1538void
1539_mesa_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
1540{
1541 GLint texSet;
1542 GET_IMMEDIATE;
1543 CHECK_ARB
1544 MULTI_TEXCOORD3( s, t, r );
1545}
1546
1547void
1548_mesa_MultiTexCoord3ivARB(GLenum target, const GLint *v)
1549{
1550 GLint texSet;
1551 GET_IMMEDIATE;
1552 CHECK_ARB
1553 MULTI_TEXCOORD3( v[0], v[1], v[2] );
1554}
1555
1556void
1557_mesa_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
1558{
1559 GLint texSet;
1560 GET_IMMEDIATE;
1561 CHECK_ARB
1562 MULTI_TEXCOORD3( s, t, r );
1563}
1564
1565void
1566_mesa_MultiTexCoord3svARB(GLenum target, const GLshort *v)
1567{
1568 GLint texSet;
1569 GET_IMMEDIATE;
1570 CHECK_ARB
1571 MULTI_TEXCOORD3( v[0], v[1], v[2] );
1572}
1573
1574void
1575_mesa_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
1576{
1577 GLint texSet;
1578 GET_IMMEDIATE;
1579 CHECK_ARB
1580 MULTI_TEXCOORD4( s, t, r, q );
1581}
1582
1583void
1584_mesa_MultiTexCoord4dvARB(GLenum target, const GLdouble *v)
1585{
1586 GLint texSet;
1587 GET_IMMEDIATE;
1588 CHECK_ARB
1589 MULTI_TEXCOORD4( v[0], v[1], v[2], v[3] );
1590}
1591
1592void
1593_mesa_MultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1594{
1595 GLint texSet;
1596 GET_IMMEDIATE;
1597 CHECK_ARB
1598 MULTI_TEXCOORD4( s, t, r, q );
1599}
1600
1601
1602void
1603_mesa_MultiTexCoord4fvARB(GLenum target, const GLfloat *v)
1604{
1605 GLint texSet;
1606 GET_IMMEDIATE;
1607 CHECK_ARB
1608 MULTI_TEXCOORD4( v[0], v[1], v[2], v[3] );
1609}
1610
1611void
1612_mesa_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
1613{
1614 GLint texSet;
1615 GET_IMMEDIATE;
1616 CHECK_ARB
1617 MULTI_TEXCOORD4( s, t, r, q );
1618}
1619
1620void
1621_mesa_MultiTexCoord4ivARB(GLenum target, const GLint *v)
1622{
1623 GLint texSet;
1624 GET_IMMEDIATE;
1625 CHECK_ARB
1626 MULTI_TEXCOORD4( v[0], v[1], v[2], v[3] );
1627}
1628
1629void
1630_mesa_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
1631{
1632 GLint texSet;
1633 GET_IMMEDIATE;
1634 CHECK_ARB
1635 MULTI_TEXCOORD4( s, t, r, q );
1636}
1637
1638void
1639_mesa_MultiTexCoord4svARB(GLenum target, const GLshort *v)
1640{
1641 GLint texSet;
1642 GET_IMMEDIATE;
1643 CHECK_ARB
1644 MULTI_TEXCOORD4( v[0], v[1], v[2], v[3] );
1645}
1646
Note: See TracBrowser for help on using the repository browser.