source: trunk/src/opengl/mesa/apiext.c@ 3086

Last change on this file since 3086 was 2962, checked in by jeroen, 25 years ago

* empty log message *

File size: 30.1 KB
Line 
1/* $Id: apiext.c,v 1.2 2000-03-01 18:49:23 jeroen Exp $ */
2
3/*
4 * Mesa 3-D graphics library
5 * Version: 3.1
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
32#ifndef XFree86Server
33#include <stdio.h>
34#include <stdlib.h>
35#else
36#include "GL/xf86glx.h"
37#endif
38#include "api.h"
39#include "types.h"
40#include "context.h"
41#include "cva.h"
42#include "image.h"
43#include "varray.h"
44#endif
45
46#if !defined(CTX_ARG)
47 #define CTX_ARG
48 #define CTX_VOID
49 #define CTX_PRM
50#endif
51
52/*
53 * Extension API functions
54 */
55
56
57
58/*
59 * GL_EXT_blend_minmax
60 */
61
62void GLAPIENTRY glBlendEquationEXT(CTX_ARG GLenum mode )
63{
64 GET_CONTEXT;
65 CHECK_CONTEXT;
66 (*CC->API.BlendEquation)(CC, mode);
67}
68
69
70
71
72/*
73 * GL_EXT_blend_color
74 */
75
76void GLAPIENTRY glBlendColorEXT(CTX_ARG GLclampf red, GLclampf green,
77 GLclampf blue, GLclampf alpha )
78{
79 GET_CONTEXT;
80 CHECK_CONTEXT;
81 (*CC->API.BlendColor)(CC, red, green, blue, alpha);
82}
83
84
85
86
87/*
88 * GL_EXT_vertex_array
89 */
90
91void GLAPIENTRY glVertexPointerEXT(CTX_ARG GLint size, GLenum type, GLsizei stride,
92 GLsizei count, const GLvoid *ptr )
93{
94 glVertexPointer(CTX_PRM size, type, stride, ptr );
95 (void) count;
96}
97
98
99void GLAPIENTRY glNormalPointerEXT(CTX_ARG GLenum type, GLsizei stride, GLsizei count,
100 const GLvoid *ptr )
101{
102 glNormalPointer(CTX_PRM type, stride, ptr);
103 (void) count;
104}
105
106
107void GLAPIENTRY glColorPointerEXT(CTX_ARG GLint size, GLenum type, GLsizei stride,
108 GLsizei count, const GLvoid *ptr )
109{
110 glColorPointer(CTX_PRM size, type, stride, ptr);
111 (void) count;
112}
113
114
115void GLAPIENTRY glIndexPointerEXT(CTX_ARG GLenum type, GLsizei stride,
116 GLsizei count, const GLvoid *ptr )
117{
118 glIndexPointer(CTX_PRM type, stride, ptr);
119 (void) count;
120}
121
122
123void GLAPIENTRY glTexCoordPointerEXT(CTX_ARG GLint size, GLenum type, GLsizei stride,
124 GLsizei count, const GLvoid *ptr )
125{
126 glTexCoordPointer(CTX_PRM size, type, stride, ptr);
127 (void) count;
128}
129
130
131void GLAPIENTRY glEdgeFlagPointerEXT(CTX_ARG GLsizei stride, GLsizei count,
132 const GLboolean *ptr )
133{
134 glEdgeFlagPointer(CTX_PRM stride, ptr);
135 (void) count;
136}
137
138
139void GLAPIENTRY glGetPointervEXT(CTX_ARG GLenum pname, GLvoid **params )
140{
141 GET_CONTEXT;
142 CHECK_CONTEXT;
143 (*CC->API.GetPointerv)(CC, pname, params);
144}
145
146
147/* glArrayElementEXT now hiding in api1.c.
148 */
149
150
151void GLAPIENTRY glDrawArraysEXT(CTX_ARG GLenum mode, GLint first, GLsizei count )
152{
153 GET_CONTEXT;
154 CHECK_CONTEXT;
155 gl_DrawArrays(CC, mode, first, count);
156}
157
158
159
160
161/*
162 * GL_EXT_texture_object
163 */
164
165GLboolean GLAPIENTRY glAreTexturesResidentEXT(CTX_ARG GLsizei n,
166 const GLuint *textures,
167 GLboolean *residences )
168{
169 return glAreTexturesResident(CTX_PRM n, textures, residences );
170}
171
172
173void GLAPIENTRY glBindTextureEXT(CTX_ARG GLenum target, GLuint texture )
174{
175 glBindTexture(CTX_PRM target, texture );
176}
177
178
179void GLAPIENTRY glDeleteTexturesEXT(CTX_ARG GLsizei n, const GLuint *textures)
180{
181 glDeleteTextures(CTX_PRM n, textures );
182}
183
184
185void GLAPIENTRY glGenTexturesEXT(CTX_ARG GLsizei n, GLuint *textures )
186{
187 glGenTextures(CTX_PRM n, textures );
188}
189
190
191GLboolean GLAPIENTRY glIsTextureEXT(CTX_ARG GLuint texture )
192{
193 return glIsTexture(CTX_PRM texture );
194}
195
196
197void GLAPIENTRY glPrioritizeTexturesEXT(CTX_ARG GLsizei n, const GLuint *textures,
198 const GLclampf *priorities )
199{
200 glPrioritizeTextures(CTX_PRM n, textures, priorities );
201}
202
203
204
205
206/*
207 * GL_EXT_texture3D
208 */
209
210void GLAPIENTRY glCopyTexSubImage3DEXT(CTX_ARG GLenum target, GLint level,
211 GLint xoffset, GLint yoffset,
212 GLint zoffset,
213 GLint x, GLint y, GLsizei width,
214 GLsizei height )
215{
216 glCopyTexSubImage3D(CTX_PRM target, level, xoffset, yoffset, zoffset,
217 x, y, width, height);
218}
219
220
221
222void GLAPIENTRY glTexImage3DEXT(CTX_ARG GLenum target, GLint level,
223 GLenum internalformat,
224 GLsizei width, GLsizei height, GLsizei depth,
225 GLint border, GLenum format, GLenum type,
226 const GLvoid *pixels )
227{
228 glTexImage3D(CTX_PRM target, level, internalformat, width, height, depth,
229 border, format, type, pixels );
230}
231
232
233void GLAPIENTRY glTexSubImage3DEXT(CTX_ARG GLenum target, GLint level, GLint xoffset,
234 GLint yoffset, GLint zoffset,
235 GLsizei width, GLsizei height,
236 GLsizei depth, GLenum format,
237 GLenum type, const GLvoid *pixels )
238{
239 glTexSubImage3D(CTX_PRM target, level, xoffset, yoffset, zoffset,
240 width, height, depth, format, type, pixels );
241}
242
243
244
245
246/*
247 * GL_EXT_point_parameters
248 */
249
250void GLAPIENTRY glPointParameterfEXT(CTX_ARG GLenum pname, GLfloat param )
251{
252 GLfloat params[3];
253 GET_CONTEXT;
254 CHECK_CONTEXT;
255 params[0] = param;
256 params[1] = 0.0;
257 params[2] = 0.0;
258 (*CC->API.PointParameterfvEXT)(CC, pname, params);
259}
260
261
262void GLAPIENTRY glPointParameterfvEXT(CTX_ARG GLenum pname, const GLfloat *params )
263{
264 GET_CONTEXT;
265 CHECK_CONTEXT;
266 (*CC->API.PointParameterfvEXT)(CC, pname, params);
267}
268
269
270
271
272#ifdef GL_MESA_window_pos
273/*
274 * Mesa implementation of glWindowPos*MESA()
275 */
276void GLAPIENTRY glWindowPos4fMESA(CTX_ARG GLfloat x, GLfloat y, GLfloat z, GLfloat w )
277{
278 GET_CONTEXT;
279 CHECK_CONTEXT;
280 (*CC->API.WindowPos4fMESA)( CC, x, y, z, w );
281}
282#else
283/* Implementation in winpos.c is used */
284#endif
285
286
287void GLAPIENTRY glWindowPos2iMESA(CTX_ARG GLint x, GLint y )
288{
289 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, 0.0F, 1.0F );
290}
291
292void GLAPIENTRY glWindowPos2sMESA(CTX_ARG GLshort x, GLshort y )
293{
294 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, 0.0F, 1.0F );
295}
296
297void GLAPIENTRY glWindowPos2fMESA(CTX_ARG GLfloat x, GLfloat y )
298{
299 glWindowPos4fMESA(CTX_PRM x, y, 0.0F, 1.0F );
300}
301
302void GLAPIENTRY glWindowPos2dMESA(CTX_ARG GLdouble x, GLdouble y )
303{
304 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, 0.0F, 1.0F );
305}
306
307void GLAPIENTRY glWindowPos2ivMESA(CTX_ARG const GLint *p )
308{
309 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], 0.0F, 1.0F );
310}
311
312void GLAPIENTRY glWindowPos2svMESA(CTX_ARG const GLshort *p )
313{
314 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], 0.0F, 1.0F );
315}
316
317void GLAPIENTRY glWindowPos2fvMESA(CTX_ARG const GLfloat *p )
318{
319 glWindowPos4fMESA(CTX_PRM p[0], p[1], 0.0F, 1.0F );
320}
321
322void GLAPIENTRY glWindowPos2dvMESA(CTX_ARG const GLdouble *p )
323{
324 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], 0.0F, 1.0F );
325}
326
327void GLAPIENTRY glWindowPos3iMESA(CTX_ARG GLint x, GLint y, GLint z )
328{
329 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F );
330}
331
332void GLAPIENTRY glWindowPos3sMESA(CTX_ARG GLshort x, GLshort y, GLshort z )
333{
334 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F );
335}
336
337void GLAPIENTRY glWindowPos3fMESA(CTX_ARG GLfloat x, GLfloat y, GLfloat z )
338{
339 glWindowPos4fMESA(CTX_PRM x, y, z, 1.0F );
340}
341
342void GLAPIENTRY glWindowPos3dMESA(CTX_ARG GLdouble x, GLdouble y, GLdouble z )
343{
344 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F );
345}
346
347void GLAPIENTRY glWindowPos3ivMESA(CTX_ARG const GLint *p )
348{
349 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], (GLfloat) p[2], 1.0F );
350}
351
352void GLAPIENTRY glWindowPos3svMESA(CTX_ARG const GLshort *p )
353{
354 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], (GLfloat) p[2], 1.0F );
355}
356
357void GLAPIENTRY glWindowPos3fvMESA(CTX_ARG const GLfloat *p )
358{
359 glWindowPos4fMESA(CTX_PRM p[0], p[1], p[2], 1.0F );
360}
361
362void GLAPIENTRY glWindowPos3dvMESA(CTX_ARG const GLdouble *p )
363{
364 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1], (GLfloat) p[2], 1.0F );
365}
366
367void GLAPIENTRY glWindowPos4iMESA(CTX_ARG GLint x, GLint y, GLint z, GLint w )
368{
369 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
370}
371
372void GLAPIENTRY glWindowPos4sMESA(CTX_ARG GLshort x, GLshort y, GLshort z, GLshort w )
373{
374 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
375}
376
377void GLAPIENTRY glWindowPos4dMESA(CTX_ARG GLdouble x, GLdouble y, GLdouble z, GLdouble w )
378{
379 glWindowPos4fMESA(CTX_PRM (GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w );
380}
381
382
383void GLAPIENTRY glWindowPos4ivMESA(CTX_ARG const GLint *p )
384{
385 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1],
386 (GLfloat) p[2], (GLfloat) p[3] );
387}
388
389void GLAPIENTRY glWindowPos4svMESA(CTX_ARG const GLshort *p )
390{
391 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1],
392 (GLfloat) p[2], (GLfloat) p[3] );
393}
394
395void GLAPIENTRY glWindowPos4fvMESA(CTX_ARG const GLfloat *p )
396{
397 glWindowPos4fMESA(CTX_PRM p[0], p[1], p[2], p[3] );
398}
399
400void GLAPIENTRY glWindowPos4dvMESA(CTX_ARG const GLdouble *p )
401{
402 glWindowPos4fMESA(CTX_PRM (GLfloat) p[0], (GLfloat) p[1],
403 (GLfloat) p[2], (GLfloat) p[3] );
404}
405
406
407
408
409/*
410 * GL_MESA_resize_buffers
411 */
412
413/*
414 * Called by user application when window has been resized.
415 */
416void GLAPIENTRY glResizeBuffersMESA(CTX_VOID )
417{
418 GET_CONTEXT;
419 CHECK_CONTEXT;
420 (*CC->API.ResizeBuffersMESA)( CC );
421}
422
423
424
425/*
426 * GL_SGIS_multitexture (obsolete - will be removed in near future)
427 */
428
429#define TEXCOORD1(s) \
430{ \
431 GLuint count; \
432 GLfloat *tc; \
433 count = IM->Count; \
434 IM->Flag[count] |= IM->TF1[texSet]; \
435 tc = IM->TexCoordPtr[texSet][count]; \
436 ASSIGN_4V(tc, s,0,0,1); \
437}
438
439
440#define TEXCOORD2(s,t) \
441{ \
442 GLuint count; \
443 GLfloat *tc; \
444 count = IM->Count; \
445 IM->Flag[count] |= IM->TF2[texSet]; \
446 tc = IM->TexCoordPtr[texSet][count]; \
447 ASSIGN_4V(tc, s,t,0,1); \
448}
449
450#define TEXCOORD3(s,t,u) \
451{ \
452 GLuint count; \
453 GLfloat *tc; \
454 count = IM->Count; \
455 IM->Flag[count] |= IM->TF3[texSet]; \
456 tc = IM->TexCoordPtr[texSet][count]; \
457 ASSIGN_4V(tc, s,t,u,1); \
458}
459
460#define TEXCOORD4(s,t,u,v) \
461{ \
462 GLuint count; \
463 GLfloat *tc; \
464 count = IM->Count; \
465 IM->Flag[count] |= IM->TF4[texSet]; \
466 tc = IM->TexCoordPtr[texSet][count]; \
467 ASSIGN_4V(tc, s,t,u,v); \
468}
469
470
471/* KW: Do the check here so that we only have to do a single range
472 * test. The possible compliance problem with this is that
473 * we will throw out error-producing calls when compiling
474 * display lists. There are ways around this if need be.
475 */
476
477
478/*
479 * GL_ARB_multitexture
480 */
481
482#define CHECK_ARB \
483 if (target >= GL_TEXTURE0_ARB && target <= GL_TEXTURE1_ARB) { \
484 texSet = target - GL_TEXTURE0_ARB; \
485 } \
486 else { \
487 gl_error(IM->backref, GL_INVALID_ENUM, "glMultiTexCoord(target)"); \
488 return; \
489 }
490
491void GLAPIENTRY glActiveTextureARB(CTX_ARG GLenum texture)
492{
493 GET_CONTEXT;
494 CHECK_CONTEXT;
495 (*CC->API.ActiveTexture)(CC, texture);
496}
497
498void GLAPIENTRY glClientActiveTextureARB(CTX_ARG GLenum texture)
499{
500 GET_CONTEXT;
501 CHECK_CONTEXT;
502 (*CC->API.ClientActiveTexture)(CC, texture);
503}
504
505void GLAPIENTRY glMultiTexCoord1dARB(CTX_ARG GLenum target, GLdouble s)
506{
507 GLint texSet;
508 GET_IMMEDIATE;
509 CHECK_ARB
510 TEXCOORD1( s );
511}
512
513void GLAPIENTRY glMultiTexCoord1dvARB(CTX_ARG GLenum target, const GLdouble *v)
514{
515 GLint texSet;
516 GET_IMMEDIATE;
517 CHECK_ARB
518 TEXCOORD1( v[0] );
519}
520
521void GLAPIENTRY glMultiTexCoord1fARB(CTX_ARG GLenum target, GLfloat s)
522{
523 GLint texSet;
524 GET_IMMEDIATE;
525 CHECK_ARB
526 TEXCOORD1( s );
527}
528
529void GLAPIENTRY glMultiTexCoord1fvARB(CTX_ARG GLenum target, const GLfloat *v)
530{
531 GLint texSet;
532 GET_IMMEDIATE;
533 CHECK_ARB
534 TEXCOORD1( v[0] );
535}
536
537void GLAPIENTRY glMultiTexCoord1iARB(CTX_ARG GLenum target, GLint s)
538{
539 GLint texSet;
540 GET_IMMEDIATE;
541 CHECK_ARB
542 TEXCOORD1( s );
543}
544
545void GLAPIENTRY glMultiTexCoord1ivARB(CTX_ARG GLenum target, const GLint *v)
546{
547 GLint texSet;
548 GET_IMMEDIATE;
549 CHECK_ARB
550 TEXCOORD1( v[0] );
551}
552
553void GLAPIENTRY glMultiTexCoord1sARB(CTX_ARG GLenum target, GLshort s)
554{
555 GLint texSet;
556 GET_IMMEDIATE;
557 CHECK_ARB
558 TEXCOORD1( s );
559}
560
561void GLAPIENTRY glMultiTexCoord1svARB(CTX_ARG GLenum target, const GLshort *v)
562{
563 GLint texSet;
564 GET_IMMEDIATE;
565 CHECK_ARB
566 TEXCOORD1( v[0] );
567}
568
569void GLAPIENTRY glMultiTexCoord2dARB(CTX_ARG GLenum target, GLdouble s, GLdouble t)
570{
571 GLint texSet;
572 GET_IMMEDIATE;
573 CHECK_ARB
574 TEXCOORD2( s, t );
575}
576
577void GLAPIENTRY glMultiTexCoord2dvARB(CTX_ARG GLenum target, const GLdouble *v)
578{
579 GLint texSet;
580 GET_IMMEDIATE;
581 CHECK_ARB
582 TEXCOORD2( v[0], v[1] );
583}
584
585void GLAPIENTRY glMultiTexCoord2fARB(CTX_ARG GLenum target, GLfloat s, GLfloat t)
586{
587 GLint texSet;
588 GET_IMMEDIATE;
589 CHECK_ARB
590 TEXCOORD2( s, t );
591}
592
593void GLAPIENTRY glMultiTexCoord2fvARB(CTX_ARG GLenum target, const GLfloat *v)
594{
595 GLint texSet;
596 GET_IMMEDIATE;
597 CHECK_ARB
598 TEXCOORD2( v[0], v[1] );
599}
600
601void GLAPIENTRY glMultiTexCoord2iARB(CTX_ARG GLenum target, GLint s, GLint t)
602{
603 GLint texSet;
604 GET_IMMEDIATE;
605 CHECK_ARB
606 TEXCOORD2( s, t );
607}
608
609void GLAPIENTRY glMultiTexCoord2ivARB(CTX_ARG GLenum target, const GLint *v)
610{
611 GLint texSet;
612 GET_IMMEDIATE;
613 CHECK_ARB
614 TEXCOORD2( v[0], v[1] );
615}
616
617void GLAPIENTRY glMultiTexCoord2sARB(CTX_ARG GLenum target, GLshort s, GLshort t)
618{
619 GLint texSet;
620 GET_IMMEDIATE;
621 CHECK_ARB
622 TEXCOORD2( s, t );
623}
624
625void GLAPIENTRY glMultiTexCoord2svARB(CTX_ARG GLenum target, const GLshort *v)
626{
627 GLint texSet;
628 GET_IMMEDIATE;
629 CHECK_ARB
630 TEXCOORD2( v[0], v[1] );
631}
632
633void GLAPIENTRY glMultiTexCoord3dARB(CTX_ARG GLenum target, GLdouble s, GLdouble t, GLdouble r)
634{
635 GLint texSet;
636 GET_IMMEDIATE;
637 CHECK_ARB
638 TEXCOORD3( s, t, r );
639}
640
641void GLAPIENTRY glMultiTexCoord3dvARB(CTX_ARG GLenum target, const GLdouble *v)
642{
643 GLint texSet;
644 GET_IMMEDIATE;
645 CHECK_ARB
646 TEXCOORD3( v[0], v[1], v[2] );
647}
648
649void GLAPIENTRY glMultiTexCoord3fARB(CTX_ARG GLenum target, GLfloat s, GLfloat t, GLfloat r)
650{
651 GLint texSet;
652 GET_IMMEDIATE;
653 CHECK_ARB
654 TEXCOORD3( s, t, r );
655}
656
657void GLAPIENTRY glMultiTexCoord3fvARB(CTX_ARG GLenum target, const GLfloat *v)
658{
659 GLint texSet;
660 GET_IMMEDIATE;
661 CHECK_ARB
662 TEXCOORD3( v[0], v[1], v[2] );
663}
664
665void GLAPIENTRY glMultiTexCoord3iARB(CTX_ARG GLenum target, GLint s, GLint t, GLint r)
666{
667 GLint texSet;
668 GET_IMMEDIATE;
669 CHECK_ARB
670 TEXCOORD3( s, t, r );
671}
672
673void GLAPIENTRY glMultiTexCoord3ivARB(CTX_ARG GLenum target, const GLint *v)
674{
675 GLint texSet;
676 GET_IMMEDIATE;
677 CHECK_ARB
678 TEXCOORD3( v[0], v[1], v[2] );
679}
680
681void GLAPIENTRY glMultiTexCoord3sARB(CTX_ARG GLenum target, GLshort s, GLshort t, GLshort r)
682{
683 GLint texSet;
684 GET_IMMEDIATE;
685 CHECK_ARB
686 TEXCOORD3( s, t, r );
687}
688
689void GLAPIENTRY glMultiTexCoord3svARB(CTX_ARG GLenum target, const GLshort *v)
690{
691 GLint texSet;
692 GET_IMMEDIATE;
693 CHECK_ARB
694 TEXCOORD3( v[0], v[1], v[2] );
695}
696
697void GLAPIENTRY glMultiTexCoord4dARB(CTX_ARG GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
698{
699 GLint texSet;
700 GET_IMMEDIATE;
701 CHECK_ARB
702 TEXCOORD4( s, t, r, q );
703}
704
705void GLAPIENTRY glMultiTexCoord4dvARB(CTX_ARG GLenum target, const GLdouble *v)
706{
707 GLint texSet;
708 GET_IMMEDIATE;
709 CHECK_ARB
710 TEXCOORD4( v[0], v[1], v[2], v[3] );
711}
712
713void GLAPIENTRY glMultiTexCoord4fARB(CTX_ARG GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
714{
715 GLint texSet;
716 GET_IMMEDIATE;
717 CHECK_ARB
718 TEXCOORD4( s, t, r, q );
719}
720
721
722void GLAPIENTRY glMultiTexCoord4fvARB(CTX_ARG GLenum target, const GLfloat *v)
723{
724 GLint texSet;
725 GET_IMMEDIATE;
726 CHECK_ARB
727 TEXCOORD4( v[0], v[1], v[2], v[3] );
728}
729
730void GLAPIENTRY glMultiTexCoord4iARB(CTX_ARG GLenum target, GLint s, GLint t, GLint r, GLint q)
731{
732 GLint texSet;
733 GET_IMMEDIATE;
734 CHECK_ARB
735 TEXCOORD4( s, t, r, q );
736}
737
738void GLAPIENTRY glMultiTexCoord4ivARB(CTX_ARG GLenum target, const GLint *v)
739{
740 GLint texSet;
741 GET_IMMEDIATE;
742 CHECK_ARB
743 TEXCOORD4( v[0], v[1], v[2], v[3] );
744}
745
746void GLAPIENTRY glMultiTexCoord4sARB(CTX_ARG GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
747{
748 GLint texSet;
749 GET_IMMEDIATE;
750 CHECK_ARB
751 TEXCOORD4( s, t, r, q );
752}
753
754void GLAPIENTRY glMultiTexCoord4svARB(CTX_ARG GLenum target, const GLshort *v)
755{
756 GLint texSet;
757 GET_IMMEDIATE;
758 CHECK_ARB
759 TEXCOORD4( v[0], v[1], v[2], v[3] );
760}
761
762
763
764/*
765 * GL_INGR_blend_func_separate
766 */
767
768void GLAPIENTRY glBlendFuncSeparateINGR(CTX_ARG GLenum sfactorRGB,
769 GLenum dfactorRGB,
770 GLenum sfactorAlpha,
771 GLenum dfactorAlpha )
772{
773 GET_CONTEXT;
774 CHECK_CONTEXT;
775 (*CC->API.BlendFuncSeparate)( CC, sfactorRGB, dfactorRGB,
776 sfactorAlpha, dfactorAlpha );
777}
778
779
780
781/*
782 * GL_PGI_misc_hints - I think this is a bit of a dead extension, but
783 * it fits well with what I want the config. file to do.
784 */
785/*** XXX there is no such entry point in gl.h
786void GLAPIENTRY glHintPGI(CTX_ARG GLenum target, GLint mode )
787{
788 GET_CONTEXT;
789 CHECK_CONTEXT;
790 (*CC->API.Hint)( CC, target, mode );
791}
792***/
793
794
795/*
796 * GL_EXT_compiled_vertex_array
797 */
798
799/* functions are in cva.c */
800
801
802/*
803 * GL_EXT_color_table
804 */
805
806void GLAPIENTRY glColorTableEXT(CTX_ARG GLenum target, GLenum internalFormat,
807 GLsizei width, GLenum format, GLenum type,
808 const GLvoid *table )
809{
810 struct gl_image *image;
811 GET_CONTEXT;
812 CHECK_CONTEXT;
813 image = gl_unpack_image( CC, width, 1, format, type, table, &CC->Unpack );
814 (*CC->API.ColorTable)( CC, target, internalFormat, image );
815 if (image->RefCount == 0)
816 gl_free_image(image);
817}
818
819
820void GLAPIENTRY glColorSubTableEXT(CTX_ARG GLenum target, GLsizei start,
821 GLsizei count, GLenum format, GLenum type,
822 const GLvoid *data )
823{
824 struct gl_image *image;
825 GET_CONTEXT;
826 CHECK_CONTEXT;
827 image = gl_unpack_image( CC, count, 1, format, type, data, &CC->Unpack );
828 (*CC->API.ColorSubTable)( CC, target, start, image );
829 if (image->RefCount == 0)
830 gl_free_image(image);
831}
832
833
834void GLAPIENTRY glGetColorTableEXT(CTX_ARG GLenum target, GLenum format,
835 GLenum type, GLvoid *table )
836{
837 GET_CONTEXT;
838 CHECK_CONTEXT;
839 (*CC->API.GetColorTable)(CC, target, format, type, table);
840}
841
842
843void GLAPIENTRY glGetColorTableParameterivEXT(CTX_ARG GLenum target, GLenum pname,
844 GLint *params )
845{
846 GET_CONTEXT;
847 CHECK_CONTEXT;
848 (*CC->API.GetColorTableParameteriv)(CC, target, pname, params);
849}
850
851
852void GLAPIENTRY glGetColorTableParameterfvEXT(CTX_ARG GLenum target, GLenum pname,
853 GLfloat *params )
854{
855 GLint iparams;
856 GET_CONTEXT;
857 CHECK_CONTEXT;
858 (*CC->API.GetColorTableParameteriv)(CC, target, pname, &iparams);
859 *params = (GLfloat) iparams;
860}
861
862
863
864
865/*
866 * OpenGL 1.2 imaging subset (most not implemented, just stubs)
867 */
868
869void GLAPIENTRY
870glBlendEquation(CTX_ARG GLenum mode )
871{
872 glBlendEquationEXT(CTX_PRM mode );
873}
874
875
876void GLAPIENTRY
877glBlendColor(CTX_ARG GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
878{
879 glBlendColorEXT(CTX_PRM red, green, blue, alpha );
880}
881
882
883void GLAPIENTRY
884glHistogram(CTX_ARG GLenum target, GLsizei width, GLenum internalFormat,
885 GLboolean sink )
886{
887 GET_CONTEXT;
888 (void) target;
889 (void) width;
890 (void) internalFormat;
891 (void) sink;
892 CHECK_CONTEXT;
893 gl_error( CC, GL_INVALID_OPERATION, "glHistogram" );
894}
895
896
897void GLAPIENTRY
898glResetHistogram(CTX_ARG GLenum target )
899{
900 GET_CONTEXT;
901 (void) target;
902 CHECK_CONTEXT;
903 gl_error( CC, GL_INVALID_OPERATION, "glResetHistogram" );
904}
905
906
907void GLAPIENTRY
908glGetHistogram(CTX_ARG GLenum target, GLboolean reset, GLenum format,
909 GLenum type, GLvoid *values )
910{
911 GET_CONTEXT;
912 (void) target;
913 (void) reset;
914 (void) format;
915 (void) type;
916 (void) values;
917 CHECK_CONTEXT;
918 gl_error( CC, GL_INVALID_OPERATION, "glGetHistogram" );
919}
920
921
922void GLAPIENTRY
923glGetHistogramParameterfv(CTX_ARG GLenum target, GLenum pname, GLfloat *params )
924{
925 GET_CONTEXT;
926 (void) target;
927 (void) pname;
928 (void) params;
929 CHECK_CONTEXT;
930 gl_error( CC, GL_INVALID_OPERATION, "glGetHistogramParameterfv" );
931}
932
933
934void GLAPIENTRY
935glGetHistogramParameteriv(CTX_ARG GLenum target, GLenum pname, GLint *params )
936{
937 GET_CONTEXT;
938 (void) target;
939 (void) pname;
940 (void) params;
941 CHECK_CONTEXT;
942 gl_error( CC, GL_INVALID_OPERATION, "glGetHistogramParameteriv" );
943}
944
945
946void GLAPIENTRY
947glMinmax(CTX_ARG GLenum target, GLenum internalFormat, GLboolean sink )
948{
949 GET_CONTEXT;
950 (void) target;
951 (void) internalFormat;
952 (void) sink;
953 CHECK_CONTEXT;
954 gl_error( CC, GL_INVALID_OPERATION, "glMinmax" );
955}
956
957
958void GLAPIENTRY
959glResetMinmax(CTX_ARG GLenum target )
960{
961 GET_CONTEXT;
962 (void) target;
963 CHECK_CONTEXT;
964 gl_error( CC, GL_INVALID_OPERATION, "glResetMinmax" );
965}
966
967
968void GLAPIENTRY
969glGetMinmax(CTX_ARG GLenum target, GLboolean reset, GLenum format, GLenum types,
970 GLvoid *values )
971{
972 GET_CONTEXT;
973 (void) target;
974 (void) reset;
975 (void) format;
976 (void) types;
977 (void) values;
978 CHECK_CONTEXT;
979 gl_error( CC, GL_INVALID_OPERATION, "glGetMinmax" );
980}
981
982
983void GLAPIENTRY
984glGetMinmaxParameterfv(CTX_ARG GLenum target, GLenum pname, GLfloat *params )
985{
986 GET_CONTEXT;
987 (void) target;
988 (void) pname;
989 (void) params;
990 CHECK_CONTEXT;
991 gl_error( CC, GL_INVALID_OPERATION, "glGetMinmaxParameterfv" );
992}
993
994
995void GLAPIENTRY
996glGetMinmaxParameteriv(CTX_ARG GLenum target, GLenum pname, GLint *params )
997{
998 GET_CONTEXT;
999 (void) target;
1000 (void) pname;
1001 (void) params;
1002 CHECK_CONTEXT;
1003 gl_error( CC, GL_INVALID_OPERATION, "glGetMinmaxParameteriv" );
1004}
1005
1006
1007void GLAPIENTRY
1008glConvolutionFilter1D(CTX_ARG GLenum target, GLenum internalFormat, GLsizei width,
1009 GLenum format, GLenum type, const GLvoid *image )
1010{
1011 GET_CONTEXT;
1012 (void) target;
1013 (void) internalFormat;
1014 (void) width;
1015 (void) format;
1016 (void) type;
1017 (void) image;
1018 CHECK_CONTEXT;
1019 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionFilter1D" );
1020}
1021
1022
1023void GLAPIENTRY
1024glConvolutionFilter2D(CTX_ARG GLenum target, GLenum internalFormat, GLsizei width,
1025 GLsizei height, GLenum format, GLenum type,
1026 const GLvoid *image )
1027{
1028 GET_CONTEXT;
1029 (void) target;
1030 (void) internalFormat;
1031 (void) width;
1032 (void) height;
1033 (void) format;
1034 (void) type;
1035 (void) image;
1036 CHECK_CONTEXT;
1037 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionFilter2D" );
1038}
1039
1040
1041void GLAPIENTRY
1042glConvolutionParameterf(CTX_ARG GLenum target, GLenum pname, GLfloat params )
1043{
1044 GET_CONTEXT;
1045 (void) target;
1046 (void) pname;
1047 (void) params;
1048 CHECK_CONTEXT;
1049 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionParameterf" );
1050}
1051
1052
1053void GLAPIENTRY
1054glConvolutionParameterfv(CTX_ARG GLenum target, GLenum pname, const GLfloat *params )
1055{
1056 GET_CONTEXT;
1057 (void) target;
1058 (void) pname;
1059 (void) params;
1060 CHECK_CONTEXT;
1061 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionParameterfv" );
1062}
1063
1064
1065void GLAPIENTRY
1066glConvolutionParameteri(CTX_ARG GLenum target, GLenum pname, GLint params )
1067{
1068 GET_CONTEXT;
1069 (void) target;
1070 (void) pname;
1071 (void) params;
1072 CHECK_CONTEXT;
1073 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionParameteri" );
1074}
1075
1076
1077void GLAPIENTRY
1078glConvolutionParameteriv(CTX_ARG GLenum target, GLenum pname, const GLint *params )
1079{
1080 GET_CONTEXT;
1081 (void) target;
1082 (void) pname;
1083 (void) params;
1084 CHECK_CONTEXT;
1085 gl_error( CC, GL_INVALID_OPERATION, "glConvolutionParameteriv" );
1086}
1087
1088
1089void GLAPIENTRY
1090glCopyConvolutionFilter1D(CTX_ARG GLenum target, GLenum internalFormat,
1091 GLint x, GLint y, GLsizei width )
1092{
1093 GET_CONTEXT;
1094 (void) target;
1095 (void) internalFormat;
1096 (void) x;
1097 (void) y;
1098 (void) width;
1099 CHECK_CONTEXT;
1100 gl_error( CC, GL_INVALID_OPERATION, "glCopyConvolutionFilter1D" );
1101}
1102
1103
1104void GLAPIENTRY
1105glCopyConvolutionFilter2D(CTX_ARG GLenum target, GLenum internalFormat,
1106 GLint x, GLint y, GLsizei width, GLsizei height)
1107{
1108 GET_CONTEXT;
1109 (void) target;
1110 (void) internalFormat;
1111 (void) x;
1112 (void) y;
1113 (void) width;
1114 (void) height;
1115 CHECK_CONTEXT;
1116 gl_error( CC, GL_INVALID_OPERATION, "glCopyConvolutionFilter2D" );
1117}
1118
1119
1120void GLAPIENTRY
1121glGetConvolutionFilter(CTX_ARG GLenum target, GLenum format,
1122 GLenum type, GLvoid *image )
1123{
1124 GET_CONTEXT;
1125 (void) target;
1126 (void) format;
1127 (void) type;
1128 (void) image;
1129 CHECK_CONTEXT;
1130 gl_error( CC, GL_INVALID_OPERATION, "glGetConvolutionFilter" );
1131}
1132
1133
1134void GLAPIENTRY
1135glGetConvolutionParameterfv(CTX_ARG GLenum target, GLenum pname, GLfloat *params )
1136{
1137 GET_CONTEXT;
1138 (void) target;
1139 (void) pname;
1140 (void) params;
1141 CHECK_CONTEXT;
1142 gl_error( CC, GL_INVALID_OPERATION, "glGetConvolutionParameterfv" );
1143}
1144
1145
1146void GLAPIENTRY
1147glGetConvolutionParameteriv(CTX_ARG GLenum target, GLenum pname, GLint *params )
1148{
1149 GET_CONTEXT;
1150 (void) target;
1151 (void) pname;
1152 (void) params;
1153 CHECK_CONTEXT;
1154 gl_error( CC, GL_INVALID_OPERATION, "glGetConvolutionParameteriv" );
1155}
1156
1157
1158void GLAPIENTRY
1159glSeparableFilter2D(CTX_ARG GLenum target, GLenum internalFormat,
1160 GLsizei width, GLsizei height, GLenum format,
1161 GLenum type, const GLvoid *row, const GLvoid *column )
1162{
1163 GET_CONTEXT;
1164 (void) target;
1165 (void) internalFormat;
1166 (void) width;
1167 (void) height;
1168 (void) format;
1169 (void) row;
1170 (void) type;
1171 (void) row;
1172 (void) column;
1173 CHECK_CONTEXT;
1174 gl_error( CC, GL_INVALID_OPERATION, "glSeperableFilter2D" );
1175}
1176
1177
1178void GLAPIENTRY
1179glGetSeparableFilter(CTX_ARG GLenum target, GLenum format, GLenum type,
1180 GLvoid *row, GLvoid *column, GLvoid *span )
1181{
1182 GET_CONTEXT;
1183 (void) target;
1184 (void) format;
1185 (void) type;
1186 (void) row;
1187 (void) column;
1188 (void) span;
1189 CHECK_CONTEXT;
1190 gl_error( CC, GL_INVALID_OPERATION, "glGetSeparableFilter" );
1191}
1192
1193
1194void GLAPIENTRY
1195glCopyColorSubTable(CTX_ARG GLenum target, GLsizei start, GLint x, GLint y,
1196 GLsizei width )
1197{
1198 GET_CONTEXT;
1199 (void) target;
1200 (void) start;
1201 (void) x;
1202 (void) y;
1203 (void) width;
1204 CHECK_CONTEXT;
1205 gl_error( CC, GL_INVALID_OPERATION, "glCopyColorSubTable" );
1206}
1207
1208
1209void GLAPIENTRY
1210glCopyColorTable(CTX_ARG GLenum target, GLenum internalFormat,
1211 GLint x, GLint y, GLsizei width )
1212{
1213 GET_CONTEXT;
1214 (void) target;
1215 (void) internalFormat;
1216 (void) x;
1217 (void) y;
1218 (void) width;
1219 CHECK_CONTEXT;
1220 gl_error( CC, GL_INVALID_OPERATION, "glCopyColorTable" );
1221}
1222
1223
1224void GLAPIENTRY
1225glColorTable(CTX_ARG GLenum target, GLenum internalFormat,
1226 GLsizei width, GLenum format, GLenum type,
1227 const GLvoid *table )
1228{
1229 glColorTableEXT(CTX_PRM target, internalFormat, width, format, type, table);
1230}
1231
1232
1233void GLAPIENTRY
1234glColorSubTable(CTX_ARG GLenum target, GLsizei start,
1235 GLsizei count, GLenum format, GLenum type,
1236 const GLvoid *data )
1237{
1238 GET_CONTEXT;
1239 (void) target;
1240 (void) start;
1241 (void) count;
1242 (void) format;
1243 (void) type;
1244 (void) data;
1245 CHECK_CONTEXT;
1246 gl_error( CC, GL_INVALID_OPERATION, "glColorSubTable" );
1247}
1248
1249
1250void GLAPIENTRY
1251glColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
1252{
1253 GET_CONTEXT;
1254 (void) target;
1255 (void) pname;
1256 (void) params;
1257 CHECK_CONTEXT;
1258 gl_error( CC, GL_INVALID_OPERATION, "glColorTableParameteriv" );
1259}
1260
1261
1262void GLAPIENTRY
1263glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
1264{
1265 GET_CONTEXT;
1266 (void) target;
1267 (void) pname;
1268 (void) params;
1269 CHECK_CONTEXT;
1270 gl_error( CC, GL_INVALID_OPERATION, "glColorTableParameterfv" );
1271}
1272
1273
1274void GLAPIENTRY
1275glGetColorTable(CTX_ARG GLenum target, GLenum format,
1276 GLenum type, GLvoid *table )
1277{
1278 glGetColorTableEXT(CTX_PRM target, format, type, table);
1279}
1280
1281
1282void GLAPIENTRY
1283glGetColorTableParameteriv(CTX_ARG GLenum target, GLenum pname,
1284 GLint *params )
1285{
1286 glGetColorTableParameterivEXT(CTX_PRM target, pname, params);
1287}
1288
1289
1290void GLAPIENTRY
1291glGetColorTableParameterfv(CTX_ARG GLenum target, GLenum pname,
1292 GLfloat *params )
1293{
1294 glGetColorTableParameterfvEXT(CTX_PRM target, pname, params);
1295}
1296
1297
Note: See TracBrowser for help on using the repository browser.