[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] | 61 | void
|
---|
| 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] | 74 | void 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 | */
|
---|
| 130 | void
|
---|
| 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 |
|
---|
| 175 | void 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 |
|
---|
| 242 | void
|
---|
| 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 |
|
---|
| 254 | void
|
---|
| 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 |
|
---|
| 270 | void
|
---|
| 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 |
|
---|
| 283 | void
|
---|
| 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 |
|
---|
| 294 | void
|
---|
| 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 |
|
---|
| 305 | void
|
---|
| 306 | _mesa_Color3ub(GLubyte red, GLubyte green, GLubyte blue )
|
---|
| 307 | {
|
---|
| 308 | GET_IMMEDIATE;
|
---|
| 309 | COLOR( IM, red, green, blue, 255 );
|
---|
| 310 | }
|
---|
| 311 |
|
---|
| 312 |
|
---|
| 313 | void
|
---|
| 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 |
|
---|
| 324 | void
|
---|
| 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 |
|
---|
| 334 | void
|
---|
| 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 |
|
---|
| 343 | void
|
---|
| 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 |
|
---|
| 360 | void
|
---|
| 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 |
|
---|
| 373 | void
|
---|
| 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 |
|
---|
| 382 | void
|
---|
| 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 |
|
---|
| 390 | void
|
---|
| 391 | _mesa_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha )
|
---|
| 392 | {
|
---|
| 393 | GET_IMMEDIATE;
|
---|
| 394 | COLOR( IM, red, green, blue, alpha );
|
---|
| 395 | }
|
---|
| 396 |
|
---|
| 397 | void
|
---|
| 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 |
|
---|
| 405 | void
|
---|
| 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 |
|
---|
| 414 | void
|
---|
| 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 |
|
---|
| 423 | void
|
---|
| 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 |
|
---|
| 439 | void
|
---|
| 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 |
|
---|
| 452 | void
|
---|
| 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 |
|
---|
| 461 | void
|
---|
| 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 |
|
---|
| 470 | void
|
---|
| 471 | _mesa_Color3ubv(const GLubyte *v )
|
---|
| 472 | {
|
---|
| 473 | GET_IMMEDIATE;
|
---|
| 474 | COLOR( IM, v[0], v[1], v[2], 255 );
|
---|
| 475 | }
|
---|
| 476 |
|
---|
| 477 |
|
---|
| 478 | void
|
---|
| 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 |
|
---|
| 487 | void
|
---|
| 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 |
|
---|
| 497 | void
|
---|
| 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 |
|
---|
| 506 | void
|
---|
| 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 |
|
---|
| 523 | void
|
---|
| 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 |
|
---|
| 536 | void
|
---|
| 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 |
|
---|
| 545 | void
|
---|
| 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 |
|
---|
| 554 | void
|
---|
| 555 | _mesa_Color4ubv(const GLubyte *v)
|
---|
| 556 | {
|
---|
| 557 | GET_IMMEDIATE;
|
---|
| 558 | COLORV( IM, v );
|
---|
| 559 | }
|
---|
| 560 |
|
---|
| 561 |
|
---|
| 562 | void
|
---|
| 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 |
|
---|
| 571 | void
|
---|
| 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 |
|
---|
| 582 | void
|
---|
| 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 |
|
---|
| 593 | void
|
---|
| 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 |
|
---|
| 615 | void
|
---|
| 616 | _mesa_Indexd( GLdouble c )
|
---|
| 617 | {
|
---|
| 618 | INDEX( (GLuint) (GLint) c );
|
---|
| 619 | }
|
---|
| 620 |
|
---|
| 621 |
|
---|
| 622 | void
|
---|
| 623 | _mesa_Indexf( GLfloat c )
|
---|
| 624 | {
|
---|
| 625 | INDEX( (GLuint) (GLint) c );
|
---|
| 626 | }
|
---|
| 627 |
|
---|
| 628 |
|
---|
| 629 | void
|
---|
| 630 | _mesa_Indexi( GLint c )
|
---|
| 631 | {
|
---|
| 632 | INDEX( (GLuint) c );
|
---|
| 633 | }
|
---|
| 634 |
|
---|
| 635 |
|
---|
| 636 | void
|
---|
| 637 | _mesa_Indexs( GLshort c )
|
---|
| 638 | {
|
---|
| 639 | INDEX( (GLuint) c );
|
---|
| 640 | }
|
---|
| 641 |
|
---|
| 642 |
|
---|
| 643 | void
|
---|
| 644 | _mesa_Indexub( GLubyte c )
|
---|
| 645 | {
|
---|
| 646 | INDEX( (GLuint) c );
|
---|
| 647 | }
|
---|
| 648 |
|
---|
| 649 |
|
---|
| 650 | void
|
---|
| 651 | _mesa_Indexdv( const GLdouble *c )
|
---|
| 652 | {
|
---|
| 653 | INDEX( (GLuint) (GLint) *c );
|
---|
| 654 | }
|
---|
| 655 |
|
---|
| 656 |
|
---|
| 657 | void
|
---|
| 658 | _mesa_Indexfv( const GLfloat *c )
|
---|
| 659 | {
|
---|
| 660 | INDEX( (GLuint) (GLint) *c );
|
---|
| 661 | }
|
---|
| 662 |
|
---|
| 663 |
|
---|
| 664 | void
|
---|
| 665 | _mesa_Indexiv( const GLint *c )
|
---|
| 666 | {
|
---|
| 667 | INDEX( *c );
|
---|
| 668 | }
|
---|
| 669 |
|
---|
| 670 |
|
---|
| 671 | void
|
---|
| 672 | _mesa_Indexsv( const GLshort *c )
|
---|
| 673 | {
|
---|
| 674 | INDEX( (GLuint) (GLint) *c );
|
---|
| 675 | }
|
---|
| 676 |
|
---|
| 677 |
|
---|
| 678 | void
|
---|
| 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 |
|
---|
| 705 | void
|
---|
| 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 |
|
---|
| 712 | void
|
---|
| 713 | _mesa_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz )
|
---|
| 714 | {
|
---|
| 715 | NORMAL(nx, ny, nz);
|
---|
| 716 | }
|
---|
| 717 |
|
---|
| 718 |
|
---|
| 719 | void
|
---|
| 720 | _mesa_Normal3f( GLfloat nx, GLfloat ny, GLfloat nz )
|
---|
| 721 | {
|
---|
| 722 | NORMAL(nx, ny, nz);
|
---|
| 723 | }
|
---|
| 724 |
|
---|
| 725 |
|
---|
| 726 | void
|
---|
| 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 |
|
---|
| 733 | void
|
---|
| 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 |
|
---|
| 740 | void
|
---|
| 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 |
|
---|
| 747 | void
|
---|
| 748 | _mesa_Normal3dv( const GLdouble *v )
|
---|
| 749 | {
|
---|
| 750 | NORMAL( v[0], v[1], v[2] );
|
---|
| 751 | }
|
---|
| 752 |
|
---|
| 753 |
|
---|
| 754 | void
|
---|
| 755 | _mesa_Normal3fv( const GLfloat *v )
|
---|
| 756 | {
|
---|
| 757 | NORMAL( v[0], v[1], v[2] );
|
---|
| 758 | }
|
---|
| 759 |
|
---|
| 760 |
|
---|
| 761 | void
|
---|
| 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 |
|
---|
| 768 | void
|
---|
| 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 |
|
---|
| 823 | void
|
---|
| 824 | _mesa_TexCoord1d( GLdouble s )
|
---|
| 825 | {
|
---|
| 826 | TEXCOORD1(s);
|
---|
| 827 | }
|
---|
| 828 |
|
---|
| 829 |
|
---|
| 830 | void
|
---|
| 831 | _mesa_TexCoord1f( GLfloat s )
|
---|
| 832 | {
|
---|
| 833 | TEXCOORD1(s);
|
---|
| 834 | }
|
---|
| 835 |
|
---|
| 836 |
|
---|
| 837 | void
|
---|
| 838 | _mesa_TexCoord1i( GLint s )
|
---|
| 839 | {
|
---|
| 840 | TEXCOORD1(s);
|
---|
| 841 | }
|
---|
| 842 |
|
---|
| 843 |
|
---|
| 844 | void
|
---|
| 845 | _mesa_TexCoord1s( GLshort s )
|
---|
| 846 | {
|
---|
| 847 | TEXCOORD1(s);
|
---|
| 848 | }
|
---|
| 849 |
|
---|
| 850 |
|
---|
| 851 | void
|
---|
| 852 | _mesa_TexCoord2d( GLdouble s, GLdouble t )
|
---|
| 853 | {
|
---|
| 854 | TEXCOORD2(s,t);
|
---|
| 855 | }
|
---|
| 856 |
|
---|
| 857 |
|
---|
| 858 | void
|
---|
| 859 | _mesa_TexCoord2f( GLfloat s, GLfloat t )
|
---|
| 860 | {
|
---|
| 861 | TEXCOORD2(*(&s),*&t);
|
---|
| 862 | }
|
---|
| 863 |
|
---|
| 864 |
|
---|
| 865 | void
|
---|
| 866 | _mesa_TexCoord2s( GLshort s, GLshort t )
|
---|
| 867 | {
|
---|
| 868 | TEXCOORD2(s,t);
|
---|
| 869 | }
|
---|
| 870 |
|
---|
| 871 |
|
---|
| 872 | void
|
---|
| 873 | _mesa_TexCoord2i( GLint s, GLint t )
|
---|
| 874 | {
|
---|
| 875 | TEXCOORD2(s,t);
|
---|
| 876 | }
|
---|
| 877 |
|
---|
| 878 |
|
---|
| 879 | void
|
---|
| 880 | _mesa_TexCoord3d( GLdouble s, GLdouble t, GLdouble r )
|
---|
| 881 | {
|
---|
| 882 | TEXCOORD3(s,t,r);
|
---|
| 883 | }
|
---|
| 884 |
|
---|
| 885 |
|
---|
| 886 | void
|
---|
| 887 | _mesa_TexCoord3f( GLfloat s, GLfloat t, GLfloat r )
|
---|
| 888 | {
|
---|
| 889 | TEXCOORD3(s,t,r);
|
---|
| 890 | }
|
---|
| 891 |
|
---|
| 892 |
|
---|
| 893 | void
|
---|
| 894 | _mesa_TexCoord3i( GLint s, GLint t, GLint r )
|
---|
| 895 | {
|
---|
| 896 | TEXCOORD3(s,t,r);
|
---|
| 897 | }
|
---|
| 898 |
|
---|
| 899 |
|
---|
| 900 | void
|
---|
| 901 | _mesa_TexCoord3s( GLshort s, GLshort t, GLshort r )
|
---|
| 902 | {
|
---|
| 903 | TEXCOORD3(s,t,r);
|
---|
| 904 | }
|
---|
| 905 |
|
---|
| 906 |
|
---|
| 907 | void
|
---|
| 908 | _mesa_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q )
|
---|
| 909 | {
|
---|
| 910 | TEXCOORD4(s,t,r,q)
|
---|
| 911 | }
|
---|
| 912 |
|
---|
| 913 |
|
---|
| 914 | void
|
---|
| 915 | _mesa_TexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q )
|
---|
| 916 | {
|
---|
| 917 | TEXCOORD4(s,t,r,q)
|
---|
| 918 | }
|
---|
| 919 |
|
---|
| 920 |
|
---|
| 921 | void
|
---|
| 922 | _mesa_TexCoord4i( GLint s, GLint t, GLint r, GLint q )
|
---|
| 923 | {
|
---|
| 924 | TEXCOORD4(s,t,r,q)
|
---|
| 925 | }
|
---|
| 926 |
|
---|
| 927 |
|
---|
| 928 | void
|
---|
| 929 | _mesa_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q )
|
---|
| 930 | {
|
---|
| 931 | TEXCOORD4(s,t,r,q)
|
---|
| 932 | }
|
---|
| 933 |
|
---|
| 934 |
|
---|
| 935 | void
|
---|
| 936 | _mesa_TexCoord1dv( const GLdouble *v )
|
---|
| 937 | {
|
---|
| 938 | TEXCOORD1(v[0]);
|
---|
| 939 | }
|
---|
| 940 |
|
---|
| 941 |
|
---|
| 942 | void
|
---|
| 943 | _mesa_TexCoord1fv( const GLfloat *v )
|
---|
| 944 | {
|
---|
| 945 | TEXCOORD1(v[0]);
|
---|
| 946 | }
|
---|
| 947 |
|
---|
| 948 |
|
---|
| 949 | void
|
---|
| 950 | _mesa_TexCoord1iv( const GLint *v )
|
---|
| 951 | {
|
---|
| 952 | TEXCOORD1(v[0]);
|
---|
| 953 | }
|
---|
| 954 |
|
---|
| 955 |
|
---|
| 956 | void
|
---|
| 957 | _mesa_TexCoord1sv( const GLshort *v )
|
---|
| 958 | {
|
---|
| 959 | TEXCOORD1(v[0]);
|
---|
| 960 | }
|
---|
| 961 |
|
---|
| 962 |
|
---|
| 963 | void
|
---|
| 964 | _mesa_TexCoord2dv( const GLdouble *v )
|
---|
| 965 | {
|
---|
| 966 | TEXCOORD2(v[0],v[1]);
|
---|
| 967 | }
|
---|
| 968 |
|
---|
| 969 |
|
---|
| 970 | void
|
---|
| 971 | _mesa_TexCoord2fv( const GLfloat *v )
|
---|
| 972 | {
|
---|
| 973 | TEXCOORD2(v[0],v[1]);
|
---|
| 974 | }
|
---|
| 975 |
|
---|
| 976 |
|
---|
| 977 | void
|
---|
| 978 | _mesa_TexCoord2iv( const GLint *v )
|
---|
| 979 | {
|
---|
| 980 | TEXCOORD2(v[0],v[1]);
|
---|
| 981 | }
|
---|
| 982 |
|
---|
| 983 |
|
---|
| 984 | void
|
---|
| 985 | _mesa_TexCoord2sv( const GLshort *v )
|
---|
| 986 | {
|
---|
| 987 | TEXCOORD2(v[0],v[1]);
|
---|
| 988 | }
|
---|
| 989 |
|
---|
| 990 |
|
---|
| 991 | void
|
---|
| 992 | _mesa_TexCoord3dv( const GLdouble *v )
|
---|
| 993 | {
|
---|
| 994 | TEXCOORD2(v[0],v[1]);
|
---|
| 995 | }
|
---|
| 996 |
|
---|
| 997 |
|
---|
| 998 | void
|
---|
| 999 | _mesa_TexCoord3fv( const GLfloat *v )
|
---|
| 1000 | {
|
---|
| 1001 | TEXCOORD3(v[0],v[1],v[2]);
|
---|
| 1002 | }
|
---|
| 1003 |
|
---|
| 1004 |
|
---|
| 1005 | void
|
---|
| 1006 | _mesa_TexCoord3iv( const GLint *v )
|
---|
| 1007 | {
|
---|
| 1008 | TEXCOORD3(v[0],v[1],v[2]);
|
---|
| 1009 | }
|
---|
| 1010 |
|
---|
| 1011 |
|
---|
| 1012 | void
|
---|
| 1013 | _mesa_TexCoord3sv( const GLshort *v )
|
---|
| 1014 | {
|
---|
| 1015 | TEXCOORD3(v[0],v[1],v[2]);
|
---|
| 1016 | }
|
---|
| 1017 |
|
---|
| 1018 |
|
---|
| 1019 | void
|
---|
| 1020 | _mesa_TexCoord4dv( const GLdouble *v )
|
---|
| 1021 | {
|
---|
| 1022 | TEXCOORD4(v[0],v[1],v[2],v[3]);
|
---|
| 1023 | }
|
---|
| 1024 |
|
---|
| 1025 |
|
---|
| 1026 | void
|
---|
| 1027 | _mesa_TexCoord4fv( const GLfloat *v )
|
---|
| 1028 | {
|
---|
| 1029 | TEXCOORD4(v[0],v[1],v[2],v[3]);
|
---|
| 1030 | }
|
---|
| 1031 |
|
---|
| 1032 |
|
---|
| 1033 | void
|
---|
| 1034 | _mesa_TexCoord4iv( const GLint *v )
|
---|
| 1035 | {
|
---|
| 1036 | TEXCOORD4(v[0],v[1],v[2],v[3]);
|
---|
| 1037 | }
|
---|
| 1038 |
|
---|
| 1039 |
|
---|
| 1040 | void
|
---|
| 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 |
|
---|
| 1084 | void
|
---|
| 1085 | _mesa_Vertex2d( GLdouble x, GLdouble y )
|
---|
| 1086 | {
|
---|
| 1087 | GET_IMMEDIATE;
|
---|
| 1088 | VERTEX2( IM, (GLfloat) x, (GLfloat) y );
|
---|
| 1089 | }
|
---|
| 1090 |
|
---|
| 1091 |
|
---|
| 1092 | void
|
---|
| 1093 | _mesa_Vertex2f( GLfloat x, GLfloat y )
|
---|
| 1094 | {
|
---|
| 1095 | GET_IMMEDIATE;
|
---|
| 1096 | VERTEX2( IM, *(&x), *(&y) );
|
---|
| 1097 | }
|
---|
| 1098 |
|
---|
| 1099 |
|
---|
| 1100 | /* Internal use:
|
---|
| 1101 | */
|
---|
| 1102 | void gl_Vertex2f( GLcontext *ctx, GLfloat x, GLfloat y )
|
---|
| 1103 | {
|
---|
| 1104 | struct immediate *im = ctx->input;
|
---|
| 1105 | VERTEX2( im, x, y );
|
---|
| 1106 | }
|
---|
| 1107 |
|
---|
| 1108 |
|
---|
| 1109 | void
|
---|
| 1110 | _mesa_Vertex2i( GLint x, GLint y )
|
---|
| 1111 | {
|
---|
| 1112 | GET_IMMEDIATE;
|
---|
| 1113 | VERTEX2( IM, (GLfloat) x, (GLfloat) y );
|
---|
| 1114 | }
|
---|
| 1115 |
|
---|
| 1116 |
|
---|
| 1117 | void
|
---|
| 1118 | _mesa_Vertex2s( GLshort x, GLshort y )
|
---|
| 1119 | {
|
---|
| 1120 | GET_IMMEDIATE;
|
---|
| 1121 | VERTEX2( IM, (GLfloat) x, (GLfloat) y );
|
---|
| 1122 | }
|
---|
| 1123 |
|
---|
| 1124 |
|
---|
| 1125 | void
|
---|
| 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 |
|
---|
| 1133 | void
|
---|
| 1134 | _mesa_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
|
---|
| 1135 | {
|
---|
| 1136 | GET_IMMEDIATE;
|
---|
| 1137 | VERTEX3( IM, *(&x), *(&y), *(&z) );
|
---|
| 1138 | }
|
---|
| 1139 |
|
---|
| 1140 |
|
---|
| 1141 | void
|
---|
| 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 |
|
---|
| 1149 | void
|
---|
| 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 |
|
---|
| 1157 | void
|
---|
| 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 |
|
---|
| 1165 | void
|
---|
| 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 |
|
---|
| 1173 | void
|
---|
| 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 |
|
---|
| 1181 | void
|
---|
| 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 |
|
---|
| 1189 | void
|
---|
| 1190 | _mesa_Vertex2dv( const GLdouble *v )
|
---|
| 1191 | {
|
---|
| 1192 | GET_IMMEDIATE;
|
---|
| 1193 | VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
|
---|
| 1194 | }
|
---|
| 1195 |
|
---|
| 1196 |
|
---|
| 1197 | void
|
---|
| 1198 | _mesa_Vertex2fv( const GLfloat *v )
|
---|
| 1199 | {
|
---|
| 1200 | GET_IMMEDIATE;
|
---|
| 1201 | VERTEX2( IM, v[0], v[1] );
|
---|
| 1202 | }
|
---|
| 1203 |
|
---|
| 1204 |
|
---|
| 1205 | void
|
---|
| 1206 | _mesa_Vertex2iv( const GLint *v )
|
---|
| 1207 | {
|
---|
| 1208 | GET_IMMEDIATE;
|
---|
| 1209 | VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
|
---|
| 1210 | }
|
---|
| 1211 |
|
---|
| 1212 |
|
---|
| 1213 | void
|
---|
| 1214 | _mesa_Vertex2sv( const GLshort *v )
|
---|
| 1215 | {
|
---|
| 1216 | GET_IMMEDIATE;
|
---|
| 1217 | VERTEX2( IM, (GLfloat) v[0], (GLfloat) v[1] );
|
---|
| 1218 | }
|
---|
| 1219 |
|
---|
| 1220 |
|
---|
| 1221 | void
|
---|
| 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 |
|
---|
| 1229 | void
|
---|
| 1230 | _mesa_Vertex3fv( const GLfloat *v )
|
---|
| 1231 | {
|
---|
| 1232 | GET_IMMEDIATE;
|
---|
| 1233 | VERTEX3( IM, v[0], v[1], v[2] );
|
---|
| 1234 | }
|
---|
| 1235 |
|
---|
| 1236 |
|
---|
| 1237 | void
|
---|
| 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 |
|
---|
| 1245 | void
|
---|
| 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 |
|
---|
| 1253 | void
|
---|
| 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 |
|
---|
| 1263 | void
|
---|
| 1264 | _mesa_Vertex4fv( const GLfloat *v )
|
---|
| 1265 | {
|
---|
| 1266 | GET_IMMEDIATE;
|
---|
| 1267 | VERTEX4( IM, v[0], v[1], v[2], v[3] );
|
---|
| 1268 | }
|
---|
| 1269 |
|
---|
| 1270 |
|
---|
| 1271 | void
|
---|
| 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 |
|
---|
| 1281 | void
|
---|
| 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 |
|
---|
| 1358 | void
|
---|
| 1359 | _mesa_MultiTexCoord1dARB(GLenum target, GLdouble s)
|
---|
| 1360 | {
|
---|
| 1361 | GLint texSet;
|
---|
| 1362 | GET_IMMEDIATE;
|
---|
| 1363 | CHECK_ARB
|
---|
| 1364 | MULTI_TEXCOORD1( s );
|
---|
| 1365 | }
|
---|
| 1366 |
|
---|
| 1367 | void
|
---|
| 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 |
|
---|
| 1376 | void
|
---|
| 1377 | _mesa_MultiTexCoord1fARB(GLenum target, GLfloat s)
|
---|
| 1378 | {
|
---|
| 1379 | GLint texSet;
|
---|
| 1380 | GET_IMMEDIATE;
|
---|
| 1381 | CHECK_ARB
|
---|
| 1382 | MULTI_TEXCOORD1( s );
|
---|
| 1383 | }
|
---|
| 1384 |
|
---|
| 1385 | void
|
---|
| 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 |
|
---|
| 1394 | void
|
---|
| 1395 | _mesa_MultiTexCoord1iARB(GLenum target, GLint s)
|
---|
| 1396 | {
|
---|
| 1397 | GLint texSet;
|
---|
| 1398 | GET_IMMEDIATE;
|
---|
| 1399 | CHECK_ARB
|
---|
| 1400 | MULTI_TEXCOORD1( s );
|
---|
| 1401 | }
|
---|
| 1402 |
|
---|
| 1403 | void
|
---|
| 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 |
|
---|
| 1412 | void
|
---|
| 1413 | _mesa_MultiTexCoord1sARB(GLenum target, GLshort s)
|
---|
| 1414 | {
|
---|
| 1415 | GLint texSet;
|
---|
| 1416 | GET_IMMEDIATE;
|
---|
| 1417 | CHECK_ARB
|
---|
| 1418 | MULTI_TEXCOORD1( s );
|
---|
| 1419 | }
|
---|
| 1420 |
|
---|
| 1421 | void
|
---|
| 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 |
|
---|
| 1430 | void
|
---|
| 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 |
|
---|
| 1439 | void
|
---|
| 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 |
|
---|
| 1448 | void
|
---|
| 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 |
|
---|
| 1457 | void
|
---|
| 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 |
|
---|
| 1466 | void
|
---|
| 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 |
|
---|
| 1475 | void
|
---|
| 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 |
|
---|
| 1484 | void
|
---|
| 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 |
|
---|
| 1493 | void
|
---|
| 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 |
|
---|
| 1502 | void
|
---|
| 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 |
|
---|
| 1511 | void
|
---|
| 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 |
|
---|
| 1520 | void
|
---|
| 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 |
|
---|
| 1529 | void
|
---|
| 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 |
|
---|
| 1538 | void
|
---|
| 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 |
|
---|
| 1547 | void
|
---|
| 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 |
|
---|
| 1556 | void
|
---|
| 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 |
|
---|
| 1565 | void
|
---|
| 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 |
|
---|
| 1574 | void
|
---|
| 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 |
|
---|
| 1583 | void
|
---|
| 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 |
|
---|
| 1592 | void
|
---|
| 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 |
|
---|
| 1602 | void
|
---|
| 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 |
|
---|
| 1611 | void
|
---|
| 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 |
|
---|
| 1620 | void
|
---|
| 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 |
|
---|
| 1629 | void
|
---|
| 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 |
|
---|
| 1638 | void
|
---|
| 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 |
|
---|