added: travMask to csm viewport
[opensg.git] / Source / Base / Base / OSGGLFuncProtos.h
blob51d9726c388a0b63bf501f039d2b84f6c62accbd
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2003 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
18 * *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
23 * *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGGLFUNCPROTOS_H_
40 #define _OSGGLFUNCPROTOS_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGConfig.h"
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 #include "OSGGL.h"
49 #endif
51 #include "OSGGLEXT.h"
53 OSG_BEGIN_NAMESPACE
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 /*---------------------------------------------------------------------------*/
57 /*! \name Shader */
58 /*! \ingroup GrpBaseBaseGLFunc */
59 /*! \{ */
61 typedef GLuint (OSG_APIENTRY * osgGlCreateShaderProc )( GLenum );
62 typedef void (OSG_APIENTRY * osgGlDeleteShaderProc )( GLuint );
63 typedef void (OSG_APIENTRY * osgGlShaderSourceProc )( GLuint,
64 GLsizei,
65 const GLchar **,
66 const GLint * );
68 typedef void (OSG_APIENTRY * osgGlCompileShaderProc)( GLuint );
70 typedef void (OSG_APIENTRY * osgGlAttachShaderProc )( GLuint,
71 GLuint );
73 typedef void (OSG_APIENTRY * osgGlGetShaderivProc )( GLuint,
74 GLenum,
75 GLint * );
76 typedef void (OSG_APIENTRY *
77 osgGlGetShaderInfoLogProc )( GLuint,
78 GLsizei,
79 GLsizei *,
80 GLchar * );
82 typedef GLuint (OSG_APIENTRY * osgGlCreateProgramProc)( void );
83 typedef void (OSG_APIENTRY * osgGlDeleteProgramProc)( GLuint );
84 typedef void (OSG_APIENTRY * osgGlLinkProgramProc )( GLuint );
85 typedef void (OSG_APIENTRY * osgGlGetProgramivProc )( GLuint,
86 GLenum,
87 GLint * );
88 typedef void (OSG_APIENTRY *
89 osgGlGetProgramInfoLogProc)( GLuint,
90 GLsizei,
91 GLsizei *,
92 GLchar *);
93 typedef void (OSG_APIENTRY * osgGlUseProgramProc )( GLuint );
95 /*! \} */
96 /*---------------------------------------------------------------------------*/
97 /*! \name Shader Uniforms */
98 /*! \ingroup GrpBaseBaseGLFunc */
99 /*! \{ */
101 typedef GLint (OSG_APIENTRY * osgGlGetUniformLocationProc)( GLuint,
102 const char *);
104 typedef void (OSG_APIENTRY * osgGlUniform1iProc )( GLint,
105 GLint );
106 typedef void (OSG_APIENTRY * osgGlUniform2iProc )( GLint,
107 GLint,
108 GLint );
109 typedef void (OSG_APIENTRY * osgGlUniform3iProc )( GLint,
110 GLint,
111 GLint,
112 GLint );
113 typedef void (OSG_APIENTRY * osgGlUniform4iProc )( GLint,
114 GLint,
115 GLint,
116 GLint,
117 GLint );
119 typedef void (OSG_APIENTRY * osgGlUniform1fProc )( GLint,
120 GLfloat );
121 typedef void (OSG_APIENTRY * osgGlUniform2fProc )( GLint,
122 GLfloat,
123 GLfloat );
124 typedef void (OSG_APIENTRY * osgGlUniform3fProc )( GLint,
125 GLfloat,
126 GLfloat,
127 GLfloat);
128 typedef void (OSG_APIENTRY * osgGlUniform4fProc )( GLint,
129 GLfloat,
130 GLfloat,
131 GLfloat,
132 GLfloat);
134 typedef void (OSG_APIENTRY * osgGlUniform1ivProc )( GLint,
135 GLsizei,
136 const GLint *);
137 typedef void (OSG_APIENTRY * osgGlUniform2ivProc )( GLint,
138 GLsizei,
139 const GLint *);
140 typedef void (OSG_APIENTRY * osgGlUniform3ivProc )( GLint,
141 GLsizei,
142 const GLint *);
143 typedef void (OSG_APIENTRY * osgGlUniform4ivProc )( GLint,
144 GLsizei,
145 const GLint *);
147 typedef void (OSG_APIENTRY * osgGlUniform1fvProc )( GLint,
148 GLsizei,
149 const GLfloat *);
150 typedef void (OSG_APIENTRY * osgGlUniform2fvProc )( GLint,
151 GLsizei,
152 const GLfloat *);
153 typedef void (OSG_APIENTRY * osgGlUniform3fvProc )( GLint,
154 GLsizei,
155 const GLfloat *);
156 typedef void (OSG_APIENTRY * osgGlUniform4fvProc )( GLint,
157 GLsizei,
158 const GLfloat *);
161 typedef void (OSG_APIENTRY * osgGlUniformMatrix2fvProc )( GLint,
162 GLsizei,
163 GLboolean,
164 const GLfloat *);
165 typedef void (OSG_APIENTRY * osgGlUniformMatrix3fvProc )( GLint,
166 GLsizei,
167 GLboolean,
168 const GLfloat *);
169 typedef void (OSG_APIENTRY * osgGlUniformMatrix4fvProc )( GLint,
170 GLsizei,
171 GLboolean,
172 const GLfloat *);
174 typedef void (OSG_APIENTRY *
175 osgGlProgramParameteriEXTProc )( GLuint,
176 GLenum,
177 GLint );
179 typedef void (OSG_APIENTRY * osgGlBindAttribLocationProc)( GLuint,
180 GLuint,
181 const GLchar * );
183 /*! \} */
184 #endif
185 /*---------------------------------------------------------------------------*/
186 /*! \name FrameBuffer Objects */
187 /*! \ingroup GrpBaseBaseGLFunc */
188 /*! \{ */
190 typedef void (OSG_APIENTRY *osgGlGenerateMipmapEXTProc)(GLenum);
192 /*! \} */
193 /*---------------------------------------------------------------------------*/
194 /*! \name Clamp Color */
195 /*! \ingroup GrpBaseBaseGLFunc */
196 /*! \{ */
198 typedef void (OSG_APIENTRY *osgGlClampColorARBProc)(GLenum, GLenum);
200 /*! \} */
201 /*---------------------------------------------------------------------------*/
202 /*! \name Texture 3D */
203 /*! \ingroup GrpBaseBaseGLFunc */
204 /*! \{ */
206 typedef void (OSG_APIENTRY *osgGlTexImage3DProc)(
207 GLenum target,
208 GLint level,
209 GLint internalformat,
210 GLsizei width,
211 GLsizei height,
212 GLsizei depth,
213 GLint border,
214 GLenum format,
215 GLenum type,
216 const GLvoid *pixels);
218 typedef void (OSG_APIENTRY*osgGlTexSubImage3DProc)(
219 GLenum target,
220 GLint level,
221 GLint xoffset,
222 GLint yoffset,
223 GLint zoffset,
224 GLsizei width,
225 GLsizei height,
226 GLsizei depth,
227 GLenum format,
228 GLenum type,
229 const GLvoid *pixels);
231 /*! \} */
232 /*---------------------------------------------------------------------------*/
233 /*! \name Texture Compressed */
234 /*! \ingroup GrpBaseBaseGLFunc */
235 /*! \{ */
237 typedef void (OSG_APIENTRY *osgGlCompressedTexImage1DProc)(
238 GLenum target,
239 GLint level,
240 GLenum internalformat,
241 GLsizei width,
242 GLint border,
243 GLsizei imageSize,
244 const GLvoid *pixels);
246 typedef void (OSG_APIENTRY *osgGlCompressedTexSubImage1DProc)(
247 GLenum target,
248 GLint level,
249 GLint xoffset,
250 GLsizei width,
251 GLenum format,
252 GLsizei imageSize,
253 const GLvoid *pixels);
256 typedef void (OSG_APIENTRY *osgGlCompressedTexImage2DProc)(
257 GLenum target,
258 GLint level,
259 GLenum internalformat,
260 GLsizei width,
261 GLsizei height,
262 GLint border,
263 GLsizei imageSize,
264 const GLvoid *pixels);
266 typedef void (OSG_APIENTRY *osgGlCompressedTexSubImage2DProc)(
267 GLenum target,
268 GLint level,
269 GLint xoffset,
270 GLint yoffset,
271 GLsizei width,
272 GLsizei height,
273 GLenum format,
274 GLsizei imageSize,
275 const GLvoid *pixels);
278 typedef void (OSG_APIENTRY *osgGlCompressedTexImage3DProc)(
279 GLenum target,
280 GLint level,
281 GLenum internalformat,
282 GLsizei width,
283 GLsizei height,
284 GLsizei depth,
285 GLint border,
286 GLsizei imageSize,
287 const GLvoid *pixels);
289 typedef void (OSG_APIENTRY *osgGlCompressedTexSubImage3DProc)(
290 GLenum target,
291 GLint level,
292 GLint xoffset,
293 GLint yoffset,
294 GLint zoffset,
295 GLsizei width,
296 GLsizei height,
297 GLsizei depth,
298 GLenum format,
299 GLsizei imageSize,
300 const GLvoid *pixels);
302 /*! \} */
303 /*---------------------------------------------------------------------------*/
304 /*! \name BufferObjects */
305 /*! \ingroup GrpBaseBaseGLFunc */
306 /*! \{ */
308 typedef void (OSG_APIENTRY *osgGlBindBufferProc )(
309 GLenum target,
310 GLuint buffer);
312 typedef void (OSG_APIENTRY *osgGlBufferDataProc )(
313 GLenum target,
314 GLsizeiptr size,
315 const void *data,
316 GLenum usage);
318 typedef void (OSG_APIENTRY *osgGlBufferSubDataProc )(
319 GLenum target,
320 GLintptr offset,
321 GLsizeiptr size,
322 const void *data);
324 typedef void (OSG_APIENTRY *osgGlGenBuffersProc )(
325 GLsizei n,
326 GLuint *bufs);
328 typedef void (OSG_APIENTRY *osgGlDeleteBuffersProc )(
329 GLsizei n,
330 const GLuint *bufs);
332 typedef void *(OSG_APIENTRY *osgGlMapBufferProc )(
333 GLenum target,
334 GLenum access);
336 typedef GLboolean (OSG_APIENTRY *osgGlUnmapBufferProc )(
337 GLenum target);
339 typedef void (OSG_APIENTRY *osgGlEnableVertexAttribArrayProc )(
340 GLuint index);
342 typedef void (OSG_APIENTRY *osgGlDisableVertexAttribArrayProc)(
343 GLuint index);
345 typedef void (OSG_APIENTRY *osgGlClientActiveTextureProc )(
346 GLenum type );
348 typedef void (OSG_APIENTRY *osgGlActiveTextureProc )(
349 GLenum texture);
351 typedef void (OSG_APIENTRY *osgGlVertexAttribPointerProc )(
352 GLuint index,
353 GLint size,
354 GLenum type,
355 GLboolean normalized,
356 GLsizei stride,
357 const GLvoid *pointer);
359 typedef void (OSG_APIENTRY *osgGlSecondaryColorPointerProc )(
360 GLint size,
361 GLenum type,
362 GLsizei stride,
363 const GLvoid *pointer);
365 typedef void (OSG_APIENTRY *osgGlGetBufferSubDataProc )(
366 GLenum,
367 GLintptr,
368 GLsizeiptr,
369 GLvoid *);
371 typedef void (OSG_APIENTRY *osgGlGetBufferParameterivProc )(
372 GLenum,
373 GLenum,
374 GLint *);
375 typedef void (OSG_APIENTRY *osgGlGetBufferPointervProc )(
376 GLenum,
377 GLenum,
378 GLvoid* *);
380 typedef GLboolean (OSG_APIENTRY *osgGlIsBufferProc )(
381 GLuint);
383 /*! \} */
384 /*---------------------------------------------------------------------------*/
385 /*! \name VertexArrayObjects */
386 /*! \ingroup GrpBaseBaseGLFunc */
387 /*! \{ */
389 typedef void (OSG_APIENTRY *osgGlBindVertexArrayProc )( GLuint array );
390 typedef void (OSG_APIENTRY *osgGlDeleteVertexArraysProc)( GLsizei n,
391 const GLuint *arrays );
392 typedef void (OSG_APIENTRY *osgGlGenVertexArraysProc )( GLsizei n,
393 GLuint *arrays);
395 /*! \} */
396 /*---------------------------------------------------------------------------*/
397 /*! \name Draw Elements */
398 /*! \ingroup GrpBaseBaseGLFunc */
399 /*! \{ */
401 typedef void (OSG_APIENTRY *osgGlLockArraysProc )( GLint,
402 GLsizei);
403 typedef void (OSG_APIENTRY *osgGlUnlockArraysProc )( void);
404 typedef void (OSG_APIENTRY *osgGlDrawRangeElementsProc)( GLenum,
405 GLuint,
406 GLuint,
407 GLsizei,
408 GLenum,
409 const GLvoid *);
411 /*! \} */
412 /*---------------------------------------------------------------------------*/
413 /*! \name Vertex Attribs */
414 /*! \ingroup GrpBaseBaseGLFunc */
415 /*! \{ */
417 typedef void (OSG_APIENTRY *osgGlMultiTexCoord3fvProc)(GLenum, const GLfloat *);
419 /*! \} */
420 /*---------------------------------------------------------------------------*/
421 /*! \name TextureBuffers */
422 /*! \ingroup GrpBaseBaseGLFunc */
423 /*! \{ */
425 typedef void (OSG_APIENTRY *osgGlFramebufferTexture1DProc)(GLenum target,
426 GLenum attachment,
427 GLenum textarget,
428 GLuint texture,
429 GLint level );
431 typedef void (OSG_APIENTRY *osgGlFramebufferTexture2DProc)(GLenum target,
432 GLenum attachment,
433 GLenum textarget,
434 GLuint texture,
435 GLint level );
437 typedef void (OSG_APIENTRY *osgGlFramebufferTexture3DProc)(GLenum target,
438 GLenum attachment,
439 GLenum textarget,
440 GLuint texture,
441 GLint level,
442 GLint zoffset );
444 typedef void (OSG_APIENTRY *osgGlGenerateMipmapProc )(GLenum target );
446 /*! \} */
447 /*---------------------------------------------------------------------------*/
448 /*! \name RenderBuffers */
449 /*! \ingroup GrpBaseBaseGLFunc */
450 /*! \{ */
452 typedef void (OSG_APIENTRY *osgGlGenRenderbuffersProc )(
453 GLsizei n,
454 GLuint *renderbuffers);
456 typedef void (OSG_APIENTRY *osgGlBindRenderbufferProc )(
457 GLenum target,
458 GLuint renderbuffer);
460 typedef void (OSG_APIENTRY *osgGlRenderbufferStorageProc )(
461 GLenum target,
462 GLenum internalformat,
463 GLsizei width,
464 GLsizei height);
466 typedef void (OSG_APIENTRY *osgGlDeleteRenderbuffersProc )(
467 GLsizei n,
468 const GLuint *renderbuffers);
470 /*! \} */
471 /*---------------------------------------------------------------------------*/
472 /*! \name FrameBufferObjects */
473 /*! \ingroup GrpBaseBaseGLFunc */
474 /*! \{ */
476 typedef void (OSG_APIENTRY *osgGlGenFramebuffersProc )(
477 GLsizei n,
478 GLuint *framebuffers);
480 typedef void (OSG_APIENTRY *osgGlDeleteFramebuffersProc )(
481 GLsizei n,
482 const GLuint *framebuffers);
484 typedef void (OSG_APIENTRY *osgGlBindFramebufferProc )(
485 GLenum target,
486 GLuint framebuffer);
488 typedef void (OSG_APIENTRY *osgGlFramebufferRenderbufferProc)(
489 GLenum target,
490 GLenum attachment,
491 GLenum renderbuffertarget,
492 GLuint renderbuffer);
494 typedef void (OSG_APIENTRY *osgGlDrawBuffersProc )(
495 GLsizei n,
496 const GLenum *buffers);
498 typedef GLenum (OSG_APIENTRY *osgGlCheckFramebufferStatusProc)(
499 GLenum target );
501 /*! \} */
502 /*---------------------------------------------------------------------------*/
503 /*! \name Point Sprites */
504 /*! \ingroup GrpBaseBaseGLFunc */
505 /*! \{ */
507 typedef void (OSG_APIENTRY *osgGlPointParameterfProc )(
508 GLenum pname,
509 GLfloat param );
511 typedef void (OSG_APIENTRY *osgGlPointParameterfvProc )(
512 GLenum pname,
513 const GLfloat *params);
515 /*! \} */
516 /*---------------------------------------------------------------------------*/
517 /*! \name Queries */
518 /*! \ingroup GrpBaseBaseGLFunc */
519 /*! \{ */
521 typedef void (OSG_APIENTRY *osgGlGenQueriesProc )( GLsizei,
522 GLuint *);
523 typedef void (OSG_APIENTRY *osgGlDeleteQueriesProc )( GLsizei,
524 const GLuint *);
525 typedef GLboolean (OSG_APIENTRY *osgGlIsQueryProc )( GLuint);
526 typedef void (OSG_APIENTRY *osgGlBeginQueryProc )( GLenum,
527 GLuint);
528 typedef void (OSG_APIENTRY *osgGlEndQueryProc )( GLenum);
529 typedef void (OSG_APIENTRY *osgGlGetQueryivProc )( GLenum,
530 GLenum,
531 GLint *);
532 typedef void (OSG_APIENTRY *osgGlGetQueryObjectivProc )( GLuint,
533 GLenum,
534 GLint *);
535 typedef void (OSG_APIENTRY *osgGlGetQueryObjectuivProc)( GLuint,
536 GLenum,
537 GLuint *);
538 typedef void (OSG_APIENTRY *osgGlBeginQueryIndexedProc)( GLenum,
539 GLuint,
540 GLuint );
541 typedef void (OSG_APIENTRY *osgGlEndQueryIndexedProc )( GLenum,
542 GLuint );
545 typedef const GLubyte * (OSG_APIENTRY *osgGlGetStringiProc)(GLenum name,
546 GLuint index);
549 /*! \} */
550 /*---------------------------------------------------------------------------*/
551 /*! \name Blending */
552 /*! \ingroup GrpBaseBaseGLFunc */
553 /*! \{ */
555 typedef void (OSG_APIENTRY *osgGlBlendColorProc )(GLclampf,
556 GLclampf,
557 GLclampf,
558 GLclampf);
559 typedef void (OSG_APIENTRY *osgGlBlendEquationProc )(GLenum);
560 typedef void (OSG_APIENTRY *osgGlBlendFuncSeparateProc)(GLenum,
561 GLenum,
562 GLenum,
563 GLenum);
565 /*! \} */
566 /*---------------------------------------------------------------------------*/
567 /*! \name ARB Program */
568 /*! \ingroup GrpBaseBaseGLFunc */
569 /*! \{ */
571 typedef void (OSG_APIENTRY *osgGlProgramStringARBProc )(
572 GLenum,
573 GLenum,
574 GLsizei,
575 const GLvoid *);
577 typedef void (OSG_APIENTRY *osgGlBindProgramARBProc )(
578 GLenum,
579 GLuint);
581 typedef void (OSG_APIENTRY *osgGlDeleteProgramsARBProc )(
582 GLsizei,
583 const GLuint *);
585 typedef void (OSG_APIENTRY *osgGlGenProgramsARBProc )(
586 GLsizei,
587 GLuint *);
589 #ifndef OSG_OGL_NO_DOUBLE
590 typedef void (OSG_APIENTRY *osgGlProgramEnvParameter4dARBProc )(
591 GLenum,
592 GLuint,
593 GLdouble,
594 GLdouble,
595 GLdouble,
596 GLdouble);
598 typedef void (OSG_APIENTRY *osgGlProgramEnvParameter4dvARBProc )(
599 GLenum,
600 GLuint,
601 const GLdouble *);
602 #endif
604 typedef void (OSG_APIENTRY *osgGlProgramEnvParameter4fARBProc )(
605 GLenum,
606 GLuint,
607 GLfloat,
608 GLfloat,
609 GLfloat,
610 GLfloat);
612 typedef void (OSG_APIENTRY *osgGlProgramEnvParameter4fvARBProc )(
613 GLenum,
614 GLuint,
615 const GLfloat *);
617 #ifndef OSG_OGL_NO_DOUBLE
618 typedef void (OSG_APIENTRY *osgGlProgramLocalParameter4dARBProc )(
619 GLenum,
620 GLuint,
621 GLdouble,
622 GLdouble,
623 GLdouble,
624 GLdouble);
626 typedef void (OSG_APIENTRY *osgGlProgramLocalParameter4dvARBProc)(
627 GLenum,
628 GLuint,
629 const GLdouble *);
630 #endif
632 typedef void (OSG_APIENTRY *osgGlProgramLocalParameter4fARBProc )(
633 GLenum,
634 GLuint,
635 GLfloat,
636 GLfloat,
637 GLfloat,
638 GLfloat);
640 typedef void (OSG_APIENTRY *osgGlProgramLocalParameter4fvARBProc)(
641 GLenum,
642 GLuint,
643 const GLfloat *);
645 typedef void (OSG_APIENTRY *osgGlGetProgramivARBProc )(
646 GLenum,
647 GLenum,
648 GLint *);
650 /*! \} */
651 /*---------------------------------------------------------------------------*/
652 /*! \name Register Combiner */
653 /*! \ingroup GrpBaseBaseGLFunc */
654 /*! \{ */
656 typedef void (OSG_APIENTRY *osgGlCombinerParameterfvNVProc )(
657 GLenum,
658 const GLfloat *);
660 typedef void (OSG_APIENTRY *osgGlCombinerParameterfNVProc )(
661 GLenum,
662 GLfloat);
664 typedef void (OSG_APIENTRY *osgGlCombinerParameterivNVProc )(
665 GLenum,
666 const GLint *);
668 typedef void (OSG_APIENTRY *osgGlCombinerParameteriNVProc )(
669 GLenum,
670 GLint);
672 typedef void (OSG_APIENTRY *osgGlCombinerInputNVProc )(
673 GLenum,
674 GLenum,
675 GLenum,
676 GLenum,
677 GLenum,
678 GLenum);
680 typedef void (OSG_APIENTRY *osgGlCombinerOutputNVProc )(
681 GLenum,
682 GLenum,
683 GLenum,
684 GLenum,
685 GLenum,
686 GLenum,
687 GLenum,
688 GLboolean,
689 GLboolean,
690 GLboolean);
692 typedef void (OSG_APIENTRY *osgGlFinalCombinerInputNVProc )(
693 GLenum,
694 GLenum,
695 GLenum,
696 GLenum);
697 typedef void (OSG_APIENTRY *osgGlGetCombinerInputParameterfvNVProc )(
698 GLenum,
699 GLenum,
700 GLenum,
701 GLenum,
702 GLfloat *);
704 typedef void (OSG_APIENTRY *osgGlGetCombinerInputParameterivNVProc )(
705 GLenum,
706 GLenum,
707 GLenum,
708 GLenum,
709 GLint *);
711 typedef void (OSG_APIENTRY *osgGlGetCombinerOutputParameterfvNVProc )(
712 GLenum,
713 GLenum,
714 GLenum,
715 GLfloat *);
717 typedef void (OSG_APIENTRY *osgGlGetCombinerOutputParameterivNVProc )(
718 GLenum,
719 GLenum,
720 GLenum,
721 GLint *);
723 typedef void (OSG_APIENTRY *osgGlGetFinalCombinerInputParameterfvNVProc)(
724 GLenum,
725 GLenum,
726 GLfloat *);
728 typedef void (OSG_APIENTRY *osgGlGetFinalCombinerInputParameterivNVProc)(
729 GLenum,
730 GLenum,
731 GLint *);
733 typedef void (OSG_APIENTRY *osgGlCombinerStageParameterfvNVProc )(
734 GLenum,
735 GLenum,
736 const GLfloat *);
738 typedef void (OSG_APIENTRY *osgGlGetCombinerStageParameterfvNVProc )(
739 GLenum,
740 GLenum,
741 GLfloat *);
743 /*! \} */
744 /*---------------------------------------------------------------------------*/
745 /*! \name Register Combiner */
746 /*! \ingroup GrpBaseBaseGLFunc */
747 /*! \{ */
749 typedef void (OSG_APIENTRY *osgGlBindBufferBaseProc )( GLenum,
750 GLuint,
751 GLuint );
752 typedef void (OSG_APIENTRY *osgGlTransformFeedbackVaryingsProc)( GLuint,
753 GLsizei,
754 const GLchar **,
755 GLenum );
757 typedef void (OSG_APIENTRY *osgGlBeginTransformFeedbackProc )( GLenum );
758 typedef void (OSG_APIENTRY *osgGlEndTransformFeedbackProc )( void );
760 typedef void (OSG_APIENTRY *osgGlPauseTransformFeedbackProc )( void );
761 typedef void (OSG_APIENTRY *osgGlResumeTransformFeedbackProc )( void );
764 /*! \} */
765 /*---------------------------------------------------------------------------*/
766 /*! \name GL Function Helper */
767 /*! \ingroup GrpBaseBaseGLFunc */
768 /*! \{ */
770 #ifdef OSG_DEBUG
772 # define OSGGETGLFUNC_W(OGLFUNC, FUNCVAR, FUNCID) \
773 OSG::FUNCVAR##Proc FUNCVAR = \
774 reinterpret_cast<OSG::FUNCVAR##Proc>( \
775 pEnv->getWindow()->getFunction(FUNCID)); \
777 if(FUNCVAR == NULL) \
778 FFATAL(("Func %s of type %s NULL, window %p\n", \
779 #FUNCVAR, #OGLFUNC, pEnv->getWindow())) \
781 # define OSGGETGLFUNCBYID_W(OGLFUNC, FUNCVAR, FUNCID, WINDOW) \
782 OSG::FUNCVAR##Proc FUNCVAR = \
783 reinterpret_cast< OSG:: FUNCVAR##Proc >( \
784 (WINDOW)->getFunction(FUNCID)); \
786 if(FUNCVAR == NULL) \
787 FFATAL(("Func %s of type %s NULL, window %p\n", \
788 #FUNCVAR, #OGLFUNC, (WINDOW))) \
790 # define OSGGETGLFUNCBYNAME_W(OGLFUNC, FUNCVAR, FUNCNAME, WINDOW) \
791 OSG::FUNCVAR##Proc FUNCVAR = \
792 reinterpret_cast<OSG::FUNCVAR##Proc>( \
793 (WINDOW)->getFunctionByName(FUNCNAME)); \
795 if(FUNCVAR == NULL) \
796 FFATAL(("Func %s of type %s NULL, window %p\n", \
797 #FUNCVAR, #OGLFUNC, (WINDOW))) \
799 #else
801 # define OSGGETGLFUNC_W(OGLFUNC, FUNCVAR, FUNCID) \
802 OSG::FUNCVAR##Proc FUNCVAR = \
803 reinterpret_cast<OSG::FUNCVAR##Proc>( \
804 pEnv->getWindow()->getFunction(FUNCID));
806 # define OSGGETGLFUNCBYID_W(OGLFUNC, FUNCVAR, FUNCID, WINDOW) \
807 OSG::FUNCVAR##Proc FUNCVAR = \
808 reinterpret_cast<OSG::FUNCVAR##Proc>( \
809 (WINDOW)->getFunction(FUNCID));
811 # define OSGGETGLFUNCBYNAME_W(OGLFUNC, FUNCVAR, FUNCNAME, WINDOW) \
812 OSG::FUNCVAR##Proc FUNCVAR = \
813 reinterpret_cast<OSG::FUNCVAR##Proc>( \
814 (WINDOW)->getFunctionByName(FUNCNAME));
816 #endif
818 #define OSGGETGLFUNC_P(OGLFUNC, FUNCVAR, FUNCID) \
819 OSG::FUNCVAR##Proc FUNCVAR = OGLFUNC;
821 #define OSGGETGLFUNCBYID_P(OGLFUNC, FUNCVAR, FUNCID, WINDOW) \
822 OSG::FUNCVAR##Proc FUNCVAR = OGLFUNC;
824 #define OSGGETGLFUNCBYNAME_P(OGLFUNC, FUNCVAR, FUNCNAME, WINDOW) \
825 OSG::FUNCVAR##Proc FUNCVAR = OGLFUNC;
829 #ifdef OSG_USE_OGL3_PROTOS
830 # define OSGGETGLFUNC_GL3(FUNCTYPE, FUNCVAR, FUNCID) \
831 OSGGETGLFUNC_P(FUNCTYPE, FUNCVAR, FUNCID)
833 # define OSGGETGLFUNCBYID_GL3(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
834 OSGGETGLFUNCBYID_P(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
836 # define OSGGETGLFUNCBYNAME_GL3(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
837 OSGGETGLFUNCBYNAME_P(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
838 #endif //OSG_USE_OGL3_PROTOS
840 #ifdef OSG_USE_OGL4_PROTOS
841 # define OSGGETGLFUNC_GL4(FUNCTYPE, FUNCVAR, FUNCID) \
842 OSGGETGLFUNC_P(FUNCTYPE, FUNCVAR, FUNCID)
844 # define OSGGETGLFUNCBYID_GL4(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
845 OSGGETGLFUNCBYID_P(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
847 # define OSGGETGLFUNCBYNAME_GL4(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
848 OSGGETGLFUNCBYNAME_P(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
849 #endif // OSG_USE_OGL4_PROTOS
852 #if defined(OSG_USE_OGLES_PROTOS) || defined(OSG_USE_OGL3_PROTOS)
853 # define OSGGETGLFUNC_GL3_ES(FUNCTYPE, FUNCVAR, FUNCID) \
854 OSGGETGLFUNC_P(FUNCTYPE, FUNCVAR, FUNCID)
856 # define OSGGETGLFUNCBYID_GL3_ES(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
857 OSGGETGLFUNCBYID_P(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
859 # define OSGGETGLFUNCBYNAME_GL3_ES(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
860 OSGGETGLFUNCBYNAME_P(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
861 #endif
864 #if defined(OSG_USE_OGLES_PROTOS) || defined(OSG_USE_OGL4_PROTOS)
865 # define OSGGETGLFUNC_GL4_ES(FUNCTYPE, FUNCVAR, FUNCID) \
866 OSGGETGLFUNC_P(FUNCTYPE, FUNCVAR, FUNCID)
868 # define OSGGETGLFUNCBYID_GL4_ES(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
869 OSGGETGLFUNCBYID_P(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
871 # define OSGGETGLFUNCBYNAME_GL4_ES(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
872 OSGGETGLFUNCBYNAME_P(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
873 #endif
875 // OpenGL 3 Protos
876 #ifndef OSGGETGLFUNC_GL3
877 # define OSGGETGLFUNC_GL3(FUNCTYPE, FUNCVAR, FUNCID) \
878 OSGGETGLFUNC_W(FUNCTYPE, FUNCVAR, FUNCID)
880 # define OSGGETGLFUNCBYID_GL3(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
881 OSGGETGLFUNCBYID_W(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
883 # define OSGGETGLFUNCBYNAME_GL3(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
884 OSGGETGLFUNCBYNAME_W(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
885 #endif //OSGGETGLFUNC_GL3
888 // OpenGL 3 and ES Protos
889 #ifndef OSGGETGLFUNC_GL3_ES
890 # define OSGGETGLFUNC_GL3_ES(FUNCTYPE, FUNCVAR, FUNCID) \
891 OSGGETGLFUNC_W(FUNCTYPE, FUNCVAR, FUNCID)
893 # define OSGGETGLFUNCBYID_GL3_ES(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
894 OSGGETGLFUNCBYID_W(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
896 # define OSGGETGLFUNCBYNAME_GL3_ES(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
897 OSGGETGLFUNCBYNAME_W(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
898 #endif //OSGGETGLFUNC_GL3_ES
901 // OpenGL 4 Protos
902 #ifndef OSGGETGLFUNC_GL4
903 # define OSGGETGLFUNC_GL4(FUNCTYPE, FUNCVAR, FUNCID) \
904 OSGGETGLFUNC_W(FUNCTYPE, FUNCVAR, FUNCID)
906 # define OSGGETGLFUNCBYID_GL4(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
907 OSGGETGLFUNCBYID_W(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
909 # define OSGGETGLFUNCBYNAME_GL4(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
910 OSGGETGLFUNCBYNAME_W(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
911 #endif //SGGETGLFUNC_GL4
914 // OpenGL 4 and ES Protos
915 #ifndef OSGGETGLFUNC_GL4_ES
916 # define OSGGETGLFUNC_GL4_ES(FUNCTYPE, FUNCVAR, FUNCID) \
917 OSGGETGLFUNC_W(FUNCTYPE, FUNCVAR, FUNCID)
919 # define OSGGETGLFUNCBYID_GL4_ES(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
920 OSGGETGLFUNCBYID_W(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
922 # define OSGGETGLFUNCBYNAME_GL4_ES(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
923 OSGGETGLFUNCBYNAME_W(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
924 #endif //OSGGETGLFUNC_GL4_ES
927 // OpenGL Ext
929 #define OSGGETGLFUNC_EXT(FUNCTYPE, FUNCVAR, FUNCID) \
930 OSGGETGLFUNC_W(FUNCTYPE, FUNCVAR, FUNCID)
932 #define OSGGETGLFUNCBYID_EXT(FUNCTYPE, FUNCVAR, FUNCID, WINDOW) \
933 OSGGETGLFUNCBYID_W(FUNCTYPE, FUNCVAR, FUNCID, WINDOW)
935 #define OSGGETGLFUNCBYNAME_EXT(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW) \
936 OSGGETGLFUNCBYNAME_W(FUNCTYPE, FUNCVAR, FUNCNAME, WINDOW)
941 /* \} */
942 /*---------------------------------------------------------------------------*/
945 OSG_END_NAMESPACE
947 #endif /* _OSGGLFUNCPROTOS_H_ */