summaryrefslogtreecommitdiffstats
path: root/sys/glsink
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
committerJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
commit39fd8a2dbd436cbabe5e336d1145b62c2a885ed5 (patch)
tree61df7da4a9d2b8bdb853af50a27219a8921bf5e4 /sys/glsink
parent1633bd8693c54cbc5f6648703a7ecf01548ec55f (diff)
downloadgst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.gz
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.bz2
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.zip
*.h: Revert indenting
Original commit message from CVS: * *.h: Revert indenting
Diffstat (limited to 'sys/glsink')
-rw-r--r--sys/glsink/ARB_multitexture.h661
-rw-r--r--sys/glsink/EXT_paletted_texture.h221
-rw-r--r--sys/glsink/NV_register_combiners.h361
-rw-r--r--sys/glsink/gstglsink.h127
4 files changed, 511 insertions, 859 deletions
diff --git a/sys/glsink/ARB_multitexture.h b/sys/glsink/ARB_multitexture.h
index 6718e2fc..36dcf011 100644
--- a/sys/glsink/ARB_multitexture.h
+++ b/sys/glsink/ARB_multitexture.h
@@ -7,42 +7,42 @@
* *
* version 1.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __ARB_MULTITEXTURE_H_
#define __ARB_MULTITEXTURE_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define ARB_MULTITEXTURE_INITIALIZE 1 // enable generic init-routines
+ */
+#define ARB_MULTITEXTURE_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -80,421 +80,232 @@ extern "C"
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
#define GL_ARB_multitexture 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glActiveTextureARB (GLenum);
- extern void APIENTRY glClientActiveTextureARB (GLenum);
- extern void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
- extern void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
- extern void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
- extern void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
- extern void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
- extern void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
- extern void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
- extern void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
- extern void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble,
- GLdouble);
- extern void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat,
- GLfloat);
- extern void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
- extern void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort,
- GLshort);
- extern void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble,
- GLdouble, GLdouble);
- extern void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat,
- GLfloat, GLfloat);
- extern void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint,
- GLint);
- extern void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort,
- GLshort, GLshort);
- extern void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // not _WIN32
- typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
- typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target,
- GLdouble s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target,
- GLfloat s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target,
- GLint s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target,
- GLshort s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target,
- GLdouble s, GLdouble t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target,
- GLfloat s, GLfloat t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target,
- GLint s, GLint t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target,
- GLshort s, GLshort t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target,
- GLdouble s, GLdouble t, GLdouble r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target,
- GLfloat s, GLfloat t, GLfloat r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target,
- GLint s, GLint t, GLint r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target,
- GLshort s, GLshort t, GLshort r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target,
- GLdouble s, GLdouble t, GLdouble r, GLdouble q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target,
- GLfloat s, GLfloat t, GLfloat r, GLfloat q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target,
- GLint s, GLint t, GLint r, GLint q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target,
- GLshort s, GLshort t, GLshort r, GLshort q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target,
- const GLshort * v);
-
-#endif // _WIN32
-
+extern void APIENTRY glActiveTextureARB (GLenum);
+extern void APIENTRY glClientActiveTextureARB (GLenum);
+extern void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
+extern void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
+extern void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
+extern void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
+extern void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
+extern void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
+extern void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
+extern void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // not _WIN32
+typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+#endif // _WIN32
+
#ifdef ARB_MULTITEXTURE_INITIALIZE
#include<string.h> // string manipulation for runtime-check
-
+
#ifdef _WIN32
- PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
- PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL;
- PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB = NULL;
- PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dvARB = NULL;
- PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB = NULL;
- PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fvARB = NULL;
- PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1iARB = NULL;
- PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1ivARB = NULL;
- PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1sARB = NULL;
- PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1svARB = NULL;
- PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2dARB = NULL;
- PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dvARB = NULL;
- PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
- PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fvARB = NULL;
- PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2iARB = NULL;
- PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2ivARB = NULL;
- PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2sARB = NULL;
- PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2svARB = NULL;
- PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3dARB = NULL;
- PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dvARB = NULL;
- PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3fARB = NULL;
- PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fvARB = NULL;
- PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3iARB = NULL;
- PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3ivARB = NULL;
- PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3sARB = NULL;
- PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3svARB = NULL;
- PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4dARB = NULL;
- PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dvARB = NULL;
- PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4fARB = NULL;
- PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB = NULL;
- PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4iARB = NULL;
- PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4ivARB = NULL;
- PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4sARB = NULL;
- PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4svARB = NULL;
-
-#endif // _WIN32
- int CheckForARBMultitextureSupport (void)
- {
- const char search[] = "GL_ARB_multitexture";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- printf ("Getting GLstring, context is %p\n", glXGetCurrentContext ());
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- printf ("Examinig GLstring\n");
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //if (debug)
- {
-
- //fprintf(stderr, search);
- //fprintf(stderr, " supported.\n");
- }
- return 1;
- }
- ++i;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_ARB_multitexture_Init (void)
- {
- if (!CheckForARBMultitextureSupport ())
- return 0;
-
+PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
+PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL;
+PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB = NULL;
+PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dvARB = NULL;
+PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB = NULL;
+PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fvARB = NULL;
+PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1iARB = NULL;
+PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1ivARB = NULL;
+PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1sARB = NULL;
+PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1svARB = NULL;
+PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2dARB = NULL;
+PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dvARB = NULL;
+PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
+PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fvARB = NULL;
+PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2iARB = NULL;
+PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2ivARB = NULL;
+PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2sARB = NULL;
+PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2svARB = NULL;
+PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3dARB = NULL;
+PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dvARB = NULL;
+PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3fARB = NULL;
+PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fvARB = NULL;
+PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3iARB = NULL;
+PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3ivARB = NULL;
+PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3sARB = NULL;
+PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3svARB = NULL;
+PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4dARB = NULL;
+PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dvARB = NULL;
+PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4fARB = NULL;
+PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB = NULL;
+PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4iARB = NULL;
+PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4ivARB = NULL;
+PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4sARB = NULL;
+PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4svARB = NULL;
+#endif // _WIN32
+
+int CheckForARBMultitextureSupport(void) {
+ const char search[]="GL_ARB_multitexture";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ printf("Getting GLstring, context is %p\n", glXGetCurrentContext());
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ printf("Examinig GLstring\n");
+ int len=strlen(extensions);
+ for ( i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //if (debug)
+ {
+ //fprintf(stderr, search);
+ //fprintf(stderr, " supported.\n");
+ }
+ return 1;
+ }
+ ++i;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_ARB_multitexture_Init(void) {
+ if (!CheckForARBMultitextureSupport()) return 0;
#ifdef _WIN32
- glActiveTextureARB =
- (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress ("glActiveTextureARB");
- if (glActiveTextureARB == NULL) {
- fprintf (stderr, "glActiveTextureARB not found.\n");
- return 0;
- }
- glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)
- wglGetProcAddress ("glClientActiveTextureARB");
- if (glClientActiveTextureARB == NULL) {
- fprintf (stderr, "glClientActiveTextureARB not found.\n");
- return 0;
- }
- glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC)
- wglGetProcAddress ("glMultiTexCoord1dARB");
- if (glMultiTexCoord1dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1dARB not found.\n");
- return 0;
- }
- glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1dvARB");
- if (glMultiTexCoord1dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC)
- wglGetProcAddress ("glMultiTexCoord1fARB");
- if (glMultiTexCoord1fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1fARB not found.\n");
- return 0;
- }
- glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1fvARB");
- if (glMultiTexCoord1fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC)
- wglGetProcAddress ("glMultiTexCoord1iARB");
- if (glMultiTexCoord1iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1iARB not found.\n");
- return 0;
- }
- glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1ivARB");
- if (glMultiTexCoord1ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC)
- wglGetProcAddress ("glMultiTexCoord1sARB");
- if (glMultiTexCoord1sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1sARB not found.\n");
- return 0;
- }
- glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1svARB");
- if (glMultiTexCoord1svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1svARB not found.\n");
- return 0;
- }
- glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC)
- wglGetProcAddress ("glMultiTexCoord2dARB");
- if (glMultiTexCoord2dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2dARB not found.\n");
- return 0;
- }
- glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2dvARB");
- if (glMultiTexCoord2dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)
- wglGetProcAddress ("glMultiTexCoord2fARB");
- if (glMultiTexCoord2fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2fARB not found.\n");
- return 0;
- }
- glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2fvARB");
- if (glMultiTexCoord2fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC)
- wglGetProcAddress ("glMultiTexCoord2iARB");
- if (glMultiTexCoord2iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2iARB not found.\n");
- return 0;
- }
- glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2ivARB");
- if (glMultiTexCoord2ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC)
- wglGetProcAddress ("glMultiTexCoord2sARB");
- if (glMultiTexCoord2sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2sARB not found.\n");
- return 0;
- }
- glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2svARB");
- if (glMultiTexCoord2svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2svARB not found.\n");
- return 0;
- }
- glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC)
- wglGetProcAddress ("glMultiTexCoord3dARB");
- if (glMultiTexCoord3dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3dARB not found.\n");
- return 0;
- }
- glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3dvARB");
- if (glMultiTexCoord3dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)
- wglGetProcAddress ("glMultiTexCoord3fARB");
- if (glMultiTexCoord3fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3fARB not found.\n");
- return 0;
- }
- glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3fvARB");
- if (glMultiTexCoord3fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC)
- wglGetProcAddress ("glMultiTexCoord3iARB");
- if (glMultiTexCoord3iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3iARB not found.\n");
- return 0;
- }
- glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3ivARB");
- if (glMultiTexCoord3ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC)
- wglGetProcAddress ("glMultiTexCoord3sARB");
- if (glMultiTexCoord3sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3sARB not found.\n");
- return 0;
- }
- glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3svARB");
- if (glMultiTexCoord3svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3svARB not found.\n");
- return 0;
- }
- glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC)
- wglGetProcAddress ("glMultiTexCoord4dARB");
- if (glMultiTexCoord4dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4dARB not found.\n");
- return 0;
- }
- glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4dvARB");
- if (glMultiTexCoord4dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC)
- wglGetProcAddress ("glMultiTexCoord4fARB");
- if (glMultiTexCoord4fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4fARB not found.\n");
- return 0;
- }
- glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4fvARB");
- if (glMultiTexCoord4fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC)
- wglGetProcAddress ("glMultiTexCoord4iARB");
- if (glMultiTexCoord4iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4iARB not found.\n");
- return 0;
- }
- glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4ivARB");
- if (glMultiTexCoord4ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC)
- wglGetProcAddress ("glMultiTexCoord4sARB");
- if (glMultiTexCoord4sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4sARB not found.\n");
- return 0;
- }
- glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4svARB");
- if (glMultiTexCoord4svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4svARB not found.\n");
- return 0;
- }
-
+ glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
+ if (glActiveTextureARB==NULL) {fprintf(stderr,"glActiveTextureARB not found.\n"); return 0; }
+ glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress("glClientActiveTextureARB");
+ if (glClientActiveTextureARB==NULL) {fprintf(stderr,"glClientActiveTextureARB not found.\n"); return 0; }
+ glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC) wglGetProcAddress("glMultiTexCoord1dARB");
+ if (glMultiTexCoord1dARB==NULL) {fprintf(stderr,"glMultiTexCoord1dARB not found.\n"); return 0; }
+ glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC) wglGetProcAddress("glMultiTexCoord1dvARB");
+ if (glMultiTexCoord1dvARB==NULL) {fprintf(stderr,"glMultiTexCoord1dAvRB not found.\n"); return 0; }
+ glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC) wglGetProcAddress("glMultiTexCoord1fARB");
+ if (glMultiTexCoord1fARB==NULL) {fprintf(stderr,"glMultiTexCoord1fARB not found.\n"); return 0; }
+ glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC) wglGetProcAddress("glMultiTexCoord1fvARB");
+ if (glMultiTexCoord1fvARB==NULL) {fprintf(stderr,"glMultiTexCoord1fvARB not found.\n"); return 0; }
+ glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC) wglGetProcAddress("glMultiTexCoord1iARB");
+ if (glMultiTexCoord1iARB==NULL) {fprintf(stderr,"glMultiTexCoord1iARB not found.\n"); return 0; }
+ glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC) wglGetProcAddress("glMultiTexCoord1ivARB");
+ if (glMultiTexCoord1ivARB==NULL) {fprintf(stderr,"glMultiTexCoord1ivARB not found.\n"); return 0; }
+ glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC) wglGetProcAddress("glMultiTexCoord1sARB");
+ if (glMultiTexCoord1sARB==NULL) {fprintf(stderr,"glMultiTexCoord1sARB not found.\n"); return 0; }
+ glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC) wglGetProcAddress("glMultiTexCoord1svARB");
+ if (glMultiTexCoord1svARB==NULL) {fprintf(stderr,"glMultiTexCoord1svARB not found.\n"); return 0; }
+ glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC) wglGetProcAddress("glMultiTexCoord2dARB");
+ if (glMultiTexCoord2dARB==NULL) {fprintf(stderr,"glMultiTexCoord2dARB not found.\n"); return 0; }
+ glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC) wglGetProcAddress("glMultiTexCoord2dvARB");
+ if (glMultiTexCoord2dvARB==NULL) {fprintf(stderr,"glMultiTexCoord2dAvRB not found.\n"); return 0; }
+ glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress("glMultiTexCoord2fARB");
+ if (glMultiTexCoord2fARB==NULL) {fprintf(stderr,"glMultiTexCoord2fARB not found.\n"); return 0; }
+ glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC) wglGetProcAddress("glMultiTexCoord2fvARB");
+ if (glMultiTexCoord2fvARB==NULL) {fprintf(stderr,"glMultiTexCoord2fvARB not found.\n"); return 0; }
+ glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC) wglGetProcAddress("glMultiTexCoord2iARB");
+ if (glMultiTexCoord2iARB==NULL) {fprintf(stderr,"glMultiTexCoord2iARB not found.\n"); return 0; }
+ glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC) wglGetProcAddress("glMultiTexCoord2ivARB");
+ if (glMultiTexCoord2ivARB==NULL) {fprintf(stderr,"glMultiTexCoord2ivARB not found.\n"); return 0; }
+ glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC) wglGetProcAddress("glMultiTexCoord2sARB");
+ if (glMultiTexCoord2sARB==NULL) {fprintf(stderr,"glMultiTexCoord2sARB not found.\n"); return 0; }
+ glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC) wglGetProcAddress("glMultiTexCoord2svARB");
+ if (glMultiTexCoord2svARB==NULL) {fprintf(stderr,"glMultiTexCoord2svARB not found.\n"); return 0; }
+ glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC) wglGetProcAddress("glMultiTexCoord3dARB");
+ if (glMultiTexCoord3dARB==NULL) {fprintf(stderr,"glMultiTexCoord3dARB not found.\n"); return 0; }
+ glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC) wglGetProcAddress("glMultiTexCoord3dvARB");
+ if (glMultiTexCoord3dvARB==NULL) {fprintf(stderr,"glMultiTexCoord3dAvRB not found.\n"); return 0; }
+ glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC) wglGetProcAddress("glMultiTexCoord3fARB");
+ if (glMultiTexCoord3fARB==NULL) {fprintf(stderr,"glMultiTexCoord3fARB not found.\n"); return 0; }
+ glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC) wglGetProcAddress("glMultiTexCoord3fvARB");
+ if (glMultiTexCoord3fvARB==NULL) {fprintf(stderr,"glMultiTexCoord3fvARB not found.\n"); return 0; }
+ glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC) wglGetProcAddress("glMultiTexCoord3iARB");
+ if (glMultiTexCoord3iARB==NULL) {fprintf(stderr,"glMultiTexCoord3iARB not found.\n"); return 0; }
+ glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC) wglGetProcAddress("glMultiTexCoord3ivARB");
+ if (glMultiTexCoord3ivARB==NULL) {fprintf(stderr,"glMultiTexCoord3ivARB not found.\n"); return 0; }
+ glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC) wglGetProcAddress("glMultiTexCoord3sARB");
+ if (glMultiTexCoord3sARB==NULL) {fprintf(stderr,"glMultiTexCoord3sARB not found.\n"); return 0; }
+ glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC) wglGetProcAddress("glMultiTexCoord3svARB");
+ if (glMultiTexCoord3svARB==NULL) {fprintf(stderr,"glMultiTexCoord3svARB not found.\n"); return 0; }
+ glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC) wglGetProcAddress("glMultiTexCoord4dARB");
+ if (glMultiTexCoord4dARB==NULL) {fprintf(stderr,"glMultiTexCoord4dARB not found.\n"); return 0; }
+ glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC) wglGetProcAddress("glMultiTexCoord4dvARB");
+ if (glMultiTexCoord4dvARB==NULL) {fprintf(stderr,"glMultiTexCoord4dAvRB not found.\n"); return 0; }
+ glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC) wglGetProcAddress("glMultiTexCoord4fARB");
+ if (glMultiTexCoord4fARB==NULL) {fprintf(stderr,"glMultiTexCoord4fARB not found.\n"); return 0; }
+ glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC) wglGetProcAddress("glMultiTexCoord4fvARB");
+ if (glMultiTexCoord4fvARB==NULL) {fprintf(stderr,"glMultiTexCoord4fvARB not found.\n"); return 0; }
+ glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC) wglGetProcAddress("glMultiTexCoord4iARB");
+ if (glMultiTexCoord4iARB==NULL) {fprintf(stderr,"glMultiTexCoord4iARB not found.\n"); return 0; }
+ glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC) wglGetProcAddress("glMultiTexCoord4ivARB");
+ if (glMultiTexCoord4ivARB==NULL) {fprintf(stderr,"glMultiTexCoord4ivARB not found.\n"); return 0; }
+ glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC) wglGetProcAddress("glMultiTexCoord4sARB");
+ if (glMultiTexCoord4sARB==NULL) {fprintf(stderr,"glMultiTexCoord4sARB not found.\n"); return 0; }
+ glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC) wglGetProcAddress("glMultiTexCoord4svARB");
+ if (glMultiTexCoord4svARB==NULL) {fprintf(stderr,"glMultiTexCoord4svARB not found.\n"); return 0; }
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // ARB_MULTITEXTURE_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __ARB_MULTITEXTURE_H_
diff --git a/sys/glsink/EXT_paletted_texture.h b/sys/glsink/EXT_paletted_texture.h
index 7cc3e5d9..37e9a9bf 100644
--- a/sys/glsink/EXT_paletted_texture.h
+++ b/sys/glsink/EXT_paletted_texture.h
@@ -7,42 +7,42 @@
* *
* version 1.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __EXT_paletted_texture_H_
#define __EXT_paletted_texture_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define EXT_PALETTED_TEXTURE_INITIALIZE 1 // enable generic init-routines
+ */
+#define EXT_PALETTED_TEXTURE_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_EXT_paletted_texture
#define GL_COLOR_INDEX1_EXT 0x80E2
#define GL_COLOR_INDEX2_EXT 0x80E3
@@ -60,128 +60,83 @@ extern "C"
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
#define GL_EXT_paletted_texture 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum,
- const GLvoid *);
- extern void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum,
- GLenum, const GLvoid *);
- extern void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
- extern void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum,
- GLint *);
- extern void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum,
- GLfloat *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // _WIN32
- typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target,
- GLenum internalFormat, GLsizei width, GLenum format, GLenum type,
- const GLvoid * data);
- typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target,
- GLsizei start, GLsizei count, GLenum format, GLenum type,
- const GLvoid * data);
- typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target,
- GLenum format, GLenum type, GLvoid * data);
- typedef void (APIENTRY *
- PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname,
- GLint * params);
- typedef void (APIENTRY *
- PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname,
- GLfloat * params);
-
-#endif // not _WIN32
-
+extern void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+extern void APIENTRY glColorSubTableEXT(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+extern void APIENTRY glGetColorTableEXT(GLenum, GLenum, GLenum, GLvoid *);
+extern void APIENTRY glGetColorTableParameterivEXT(GLenum, GLenum, GLint *);
+extern void APIENTRY glGetColorTableParameterfvEXT(GLenum, GLenum, GLfloat *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // _WIN32
+typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC)(GLenum target, GLenum format, GLenum type, GLvoid *data);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)(GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)(GLenum target, GLenum pname, GLfloat *params);
+#endif // not _WIN32
+
#ifdef EXT_PALETTED_TEXTURE_INITIALIZE
-#include<string.h> // string manipulation for runtime-check
-
+#include<string.h> // string manipulation for runtime-check
+
#ifdef _WIN32
- PFNGLCOLORTABLEEXTPROC glColorTableEXT = NULL;
- PFNGLCOLORSUBTABLEEXTPROC glColorSubTableEXT = NULL;
- PFNGLGETCOLORTABLEEXTPROC glGetColorTableEXT = NULL;
- PFNGLGETCOLORTABLEPARAMETERIVEXTPROC glGetColorTableParameterivEXT = NULL;
- PFNGLGETCOLORTABLEPARAMETERFVEXTPROC glGetColorTableParameterfvEXT = NULL;
-
-#endif // _WIN32
- int CheckForEXTPalettedTextureSupport (void)
- {
- const char search[] = "GL_EXT_paletted_texture";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //printf(search);
- //printf(" supported.\n");
- return 1;
- }
- i++;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_EXT_paletted_texture_Init (void)
- {
- if (!CheckForEXTPalettedTextureSupport ())
- return 0;
-
+PFNGLCOLORTABLEEXTPROC glColorTableEXT = NULL;
+PFNGLCOLORSUBTABLEEXTPROC glColorSubTableEXT = NULL;
+PFNGLGETCOLORTABLEEXTPROC glGetColorTableEXT = NULL;
+PFNGLGETCOLORTABLEPARAMETERIVEXTPROC glGetColorTableParameterivEXT = NULL;
+PFNGLGETCOLORTABLEPARAMETERFVEXTPROC glGetColorTableParameterfvEXT = NULL;
+#endif // _WIN32
+
+int CheckForEXTPalettedTextureSupport(void) {
+ const char search[]="GL_EXT_paletted_texture";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ int len=strlen(extensions);
+ for (i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //printf(search);
+ //printf(" supported.\n");
+ return 1;
+ }
+ i++;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_EXT_paletted_texture_Init(void) {
+ if (!CheckForEXTPalettedTextureSupport()) return 0;
+
#ifdef _WIN32
- glColorTableEXT =
- (PFNGLCOLORTABLEEXTPROC) wglGetProcAddress ("glColorTableEXT");
- if (glColorTableEXT == NULL) {
- fprintf (stderr, "glColorTableEXT not found.\n");
- return 0;
- }
- glColorSubTableEXT =
- (PFNGLCOLORSUBTABLEEXTPROC) wglGetProcAddress ("glColorSubTableEXT");
- if (glColorSubTableEXT == NULL) {
- fprintf (stderr, "glColorSubTableEXT not found.\n");
- return 0;
- }
- glGetColorTableEXT =
- (PFNGLGETCOLORTABLEEXTPROC) wglGetProcAddress ("glGetColorTableEXT");
- if (glGetColorTableEXT == NULL) {
- fprintf (stderr, "glGetColorTableEXT not found.\n");
- return 0;
- }
- glGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)
- wglGetProcAddress ("glGetColorTableParameterivEXT");
- if (glGetColorTableParameterivEXT == NULL) {
- fprintf (stderr, "glGetColorTableParameterivEXT not found.\n");
- return 0;
- }
- glGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
- wglGetProcAddress ("glGetColorTableParameterfvEXT");
- if (glGetColorTableParameterfvEXT == NULL) {
- fprintf (stderr, "glGetColorTableParameterfvEXT not found.\n");
- return 0;
- }
-
+ glColorTableEXT = (PFNGLCOLORTABLEEXTPROC) wglGetProcAddress("glColorTableEXT");
+ if (glColorTableEXT==NULL) {fprintf(stderr,"glColorTableEXT not found.\n"); return 0;}
+ glColorSubTableEXT = (PFNGLCOLORSUBTABLEEXTPROC) wglGetProcAddress("glColorSubTableEXT");
+ if (glColorSubTableEXT==NULL) {fprintf(stderr,"glColorSubTableEXT not found.\n"); return 0;}
+ glGetColorTableEXT = (PFNGLGETCOLORTABLEEXTPROC) wglGetProcAddress("glGetColorTableEXT");
+ if (glGetColorTableEXT==NULL) {fprintf(stderr,"glGetColorTableEXT not found.\n"); return 0;}
+ glGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) wglGetProcAddress("glGetColorTableParameterivEXT");
+ if (glGetColorTableParameterivEXT==NULL) {fprintf(stderr,"glGetColorTableParameterivEXT not found.\n"); return 0;}
+ glGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) wglGetProcAddress("glGetColorTableParameterfvEXT");
+ if (glGetColorTableParameterfvEXT==NULL) {fprintf(stderr,"glGetColorTableParameterfvEXT not found.\n"); return 0;}
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // EXT_PALETTED_TEXTURE_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __EXT_PALETTED_TEXTURE_H_
diff --git a/sys/glsink/NV_register_combiners.h b/sys/glsink/NV_register_combiners.h
index 83f33edc..52b74c39 100644
--- a/sys/glsink/NV_register_combiners.h
+++ b/sys/glsink/NV_register_combiners.h
@@ -7,42 +7,42 @@
* *
* version 2.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __NV_register_combiners_H_
#define __NV_register_combiners_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define NV_REGISTER_COMBINERS_INITIALIZE 1 // enable generic init-routines
+ */
+#define NV_REGISTER_COMBINERS_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_NV_register_combiners
#define GL_REGISTER_COMBINERS_NV 0x8522
#define GL_COMBINER0_NV 0x8550
@@ -96,228 +96,123 @@ extern "C"
#define GL_COLOR_SUM_CLAMP_NV 0x854F
#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
#define GL_NV_register_combiners 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
- extern void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
- extern void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
- extern void APIENTRY glCombinerParameteriNV (GLenum, GLint);
- extern void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum,
- GLenum, GLenum);
- extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum,
- GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
- extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum,
- GLenum);
- extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum,
- GLenum, GLenum, GLfloat *);
- extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum,
- GLenum, GLenum, GLint *);
- extern void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum,
- GLenum, GLfloat *);
- extern void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum,
- GLenum, GLint *);
- extern void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum,
- GLfloat *);
- extern void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum,
- GLint *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // _WIN32
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname,
- const GLfloat * params);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname,
- const GLint * params);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname,
- GLfloat param);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname,
- GLint param);
- typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage,
- GLenum portion, GLenum variable, GLenum input, GLenum mapping,
- GLenum componentUsage);
- typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage,
- GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput,
- GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct,
- GLboolean muxSum);
- typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable,
- GLenum input, GLenum mapping, GLenum componentUsage);
- typedef void (APIENTRY *
- PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion,
- GLenum variable, GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion,
- GLenum variable, GLenum pname, GLint * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion,
- GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion,
- GLenum pname, GLint * params);
- typedef void (APIENTRY *
- PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable,
- GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable,
- GLenum pname, GLint * params);
-
-#endif // not _WIN32
-
+extern void APIENTRY glCombinerParameterfvNV(GLenum, const GLfloat *);
+extern void APIENTRY glCombinerParameterivNV(GLenum, const GLint *);
+extern void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
+extern void APIENTRY glCombinerParameteriNV (GLenum, GLint);
+extern void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
+extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
+extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
+extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
+extern void APIENTRY glGetCombinerOutputParameterfvNV(GLenum, GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetCombinerOutputParameterivNV(GLenum, GLenum, GLenum, GLint *);
+extern void APIENTRY glGetFinalCombinerInputParameterfvNV(GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetFinalCombinerInputParameterivNV(GLenum, GLenum, GLint *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // _WIN32
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)(GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)(GLenum variable, GLenum pname, GLint *params);
+#endif // not _WIN32
+
#ifdef NV_REGISTER_COMBINERS_INITIALIZE
-#include<string.h> // string manipulation for runtime-check
-
+#include<string.h> // string manipulation for runtime-check
+
#ifdef _WIN32
- PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV = NULL;
- PFNGLCOMBINERPARAMETERIVNVPROC glCombinerParameterivNV = NULL;
- PFNGLCOMBINERPARAMETERFNVPROC glCombinerParameterfNV = NULL;
- PFNGLCOMBINERPARAMETERINVPROC glCombinerParameteriNV = NULL;
- PFNGLCOMBINERINPUTNVPROC glCombinerInputNV = NULL;
- PFNGLCOMBINEROUTPUTNVPROC glCombinerOutputNV = NULL;
- PFNGLFINALCOMBINERINPUTNVPROC glFinalCombinerInputNV = NULL;
- PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC glGetCombinerInputParameterfvNV =
- NULL;
- PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC glGetCombinerInputParameterivNV =
- NULL;
- PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC glGetCombinerOutputParameterfvNV =
- NULL;
- PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC glGetCombinerOutputParameterivNV =
- NULL;
- PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC
- glGetFinalCombinerInputParameterfvNV = NULL;
- PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC
- glGetFinalCombinerInputParameterivNV = NULL;
-
-#endif // _WIN32
- int CheckForNVRegisterCombinersSupport (void)
- {
- const char search[] = "GL_NV_register_combiners";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //printf(search);
- // printf(" supported.\n");
- return 1;
- }
- i++;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_NV_register_combiners_Init (void)
- {
- if (!CheckForNVRegisterCombinersSupport ())
- return 0;
-
+PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV = NULL;
+PFNGLCOMBINERPARAMETERIVNVPROC glCombinerParameterivNV = NULL;
+PFNGLCOMBINERPARAMETERFNVPROC glCombinerParameterfNV = NULL;
+PFNGLCOMBINERPARAMETERINVPROC glCombinerParameteriNV = NULL;
+PFNGLCOMBINERINPUTNVPROC glCombinerInputNV = NULL;
+PFNGLCOMBINEROUTPUTNVPROC glCombinerOutputNV = NULL;
+PFNGLFINALCOMBINERINPUTNVPROC glFinalCombinerInputNV = NULL;
+PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC glGetCombinerInputParameterfvNV = NULL;
+PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC glGetCombinerInputParameterivNV = NULL;
+PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC glGetCombinerOutputParameterfvNV = NULL;
+PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC glGetCombinerOutputParameterivNV = NULL;
+PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC glGetFinalCombinerInputParameterfvNV = NULL;
+PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC glGetFinalCombinerInputParameterivNV = NULL;
+#endif // _WIN32
+
+int CheckForNVRegisterCombinersSupport(void) {
+ const char search[]="GL_NV_register_combiners";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ int len=strlen(extensions);
+ for (i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //printf(search);
+ // printf(" supported.\n");
+ return 1;
+ }
+ i++;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_NV_register_combiners_Init(void) {
+ if (!CheckForNVRegisterCombinersSupport()) return 0;
+
#ifdef _WIN32
- glCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC)
- wglGetProcAddress ("glCombinerParameterfvNV");
- if (glCombinerParameterfvNV == NULL) {
- fprintf (stderr, "glCombinerParameterfvNV not found.\n");
- return 0;
- }
- glCombinerParameterivNV = (PFNGLCOMBINERPARAMETERIVNVPROC)
- wglGetProcAddress ("glCombinerParameterivNV");
- if (glCombinerParameterivNV == NULL) {
- fprintf (stderr, "glCombinerParameterivNV not found.\n");
- return 0;
- }
- glCombinerParameterfNV = (PFNGLCOMBINERPARAMETERFNVPROC)
- wglGetProcAddress ("glCombinerParameterfNV");
- if (glCombinerParameterfvNV == NULL) {
- fprintf (stderr, "glCombinerParameterfNV not found.\n");
- return 0;
- }
- glCombinerParameteriNV = (PFNGLCOMBINERPARAMETERINVPROC)
- wglGetProcAddress ("glCombinerParameteriNV");
- if (glCombinerParameterivNV == NULL) {
- fprintf (stderr, "glCombinerParameteriNV not found.\n");
- return 0;
- }
- glCombinerInputNV =
- (PFNGLCOMBINERINPUTNVPROC) wglGetProcAddress ("glCombinerInputNV");
- if (glCombinerInputNV == NULL) {
- fprintf (stderr, "glCombinerInputNV not found.\n");
- return 0;
- }
- glCombinerOutputNV =
- (PFNGLCOMBINEROUTPUTNVPROC) wglGetProcAddress ("glCombinerOutputNV");
- if (glCombinerOutputNV == NULL) {
- fprintf (stderr, "glCombinerOutputNV not found.\n");
- return 0;
- }
- glFinalCombinerInputNV = (PFNGLFINALCOMBINERINPUTNVPROC)
- wglGetProcAddress ("glFinalCombinerInputNV");
- if (glFinalCombinerInputNV == NULL) {
- fprintf (stderr, "glFinalCombinerInputNV not found.\n");
- return 0;
- }
- glGetCombinerInputParameterfvNV = (PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetCombinerInputParameterfvNV");
- if (glGetCombinerInputParameterfvNV == NULL) {
- fprintf (stderr, "glGetCombinerInputParameterfvNV not found.\n");
- return 0;
- }
- glGetCombinerInputParameterivNV = (PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetCombinerInputParameterivNV");
- if (glGetCombinerInputParameterivNV == NULL) {
- fprintf (stderr, "glGetCombinerInputParameterivNV not found.\n");
- return 0;
- }
- glGetCombinerOutputParameterfvNV =
- (PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetCombinerOutputParameterfvNV");
- if (glGetCombinerOutputParameterfvNV == NULL) {
- fprintf (stderr, "glGetCombinerOutputParameterfvNV not found.\n");
- return 0;
- }
- glGetCombinerOutputParameterivNV =
- (PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetCombinerOutputParameterivNV");
- if (glGetCombinerOutputParameterivNV == NULL) {
- fprintf (stderr, "glGetCombinerOutputParameterivNV not found.\n");
- return 0;
- }
- glGetFinalCombinerInputParameterfvNV =
- (PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetFinalCombinerInputParameterfvNV");
- if (glGetFinalCombinerInputParameterfvNV == NULL) {
- fprintf (stderr, "glGetFinalCombinerInputParameterfvNV not found.\n");
- return 0;
- }
- glGetFinalCombinerInputParameterivNV =
- (PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetFinalCombinerInputParameterivNV");
- if (glGetFinalCombinerInputParameterivNV == NULL) {
- fprintf (stderr, "glGetFinalCombinerInputParameterivNV not found.\n");
- return 0;
- }
-
+ glCombinerParameterfvNV=(PFNGLCOMBINERPARAMETERFVNVPROC) wglGetProcAddress("glCombinerParameterfvNV");
+ if (glCombinerParameterfvNV==NULL) {fprintf(stderr,"glCombinerParameterfvNV not found.\n"); return 0;}
+ glCombinerParameterivNV=(PFNGLCOMBINERPARAMETERIVNVPROC) wglGetProcAddress("glCombinerParameterivNV");
+ if (glCombinerParameterivNV==NULL) {fprintf(stderr,"glCombinerParameterivNV not found.\n"); return 0;}
+ glCombinerParameterfNV=(PFNGLCOMBINERPARAMETERFNVPROC) wglGetProcAddress("glCombinerParameterfNV");
+ if (glCombinerParameterfvNV==NULL) {fprintf(stderr,"glCombinerParameterfNV not found.\n"); return 0;}
+ glCombinerParameteriNV=(PFNGLCOMBINERPARAMETERINVPROC) wglGetProcAddress("glCombinerParameteriNV");
+ if (glCombinerParameterivNV==NULL) {fprintf(stderr,"glCombinerParameteriNV not found.\n"); return 0;}
+ glCombinerInputNV=(PFNGLCOMBINERINPUTNVPROC) wglGetProcAddress("glCombinerInputNV");
+ if (glCombinerInputNV==NULL) {fprintf(stderr,"glCombinerInputNV not found.\n"); return 0;}
+ glCombinerOutputNV=(PFNGLCOMBINEROUTPUTNVPROC) wglGetProcAddress("glCombinerOutputNV");
+ if (glCombinerOutputNV==NULL) {fprintf(stderr,"glCombinerOutputNV not found.\n"); return 0;}
+ glFinalCombinerInputNV=(PFNGLFINALCOMBINERINPUTNVPROC) wglGetProcAddress("glFinalCombinerInputNV");
+ if (glFinalCombinerInputNV==NULL) {fprintf(stderr,"glFinalCombinerInputNV not found.\n"); return 0;}
+ glGetCombinerInputParameterfvNV=(PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetCombinerInputParameterfvNV");
+ if (glGetCombinerInputParameterfvNV==NULL) {fprintf(stderr,"glGetCombinerInputParameterfvNV not found.\n"); return 0;}
+ glGetCombinerInputParameterivNV=(PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetCombinerInputParameterivNV");
+ if (glGetCombinerInputParameterivNV==NULL) {fprintf(stderr,"glGetCombinerInputParameterivNV not found.\n"); return 0;}
+ glGetCombinerOutputParameterfvNV=(PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetCombinerOutputParameterfvNV");
+ if (glGetCombinerOutputParameterfvNV==NULL) {fprintf(stderr,"glGetCombinerOutputParameterfvNV not found.\n"); return 0;}
+ glGetCombinerOutputParameterivNV=(PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetCombinerOutputParameterivNV");
+ if (glGetCombinerOutputParameterivNV==NULL) {fprintf(stderr,"glGetCombinerOutputParameterivNV not found.\n"); return 0;}
+ glGetFinalCombinerInputParameterfvNV=(PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetFinalCombinerInputParameterfvNV");
+ if (glGetFinalCombinerInputParameterfvNV==NULL) {fprintf(stderr,"glGetFinalCombinerInputParameterfvNV not found.\n"); return 0;}
+ glGetFinalCombinerInputParameterivNV=(PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetFinalCombinerInputParameterivNV");
+ if (glGetFinalCombinerInputParameterivNV==NULL) {fprintf(stderr,"glGetFinalCombinerInputParameterivNV not found.\n"); return 0;}
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // NV_REGISTER_COMBINERS_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __NV_REGISTER_COMBINERS_H_
diff --git a/sys/glsink/gstglsink.h b/sys/glsink/gstglsink.h
index 036ee78d..8a34df9a 100644
--- a/sys/glsink/gstglsink.h
+++ b/sys/glsink/gstglsink.h
@@ -25,81 +25,72 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define MAX_FLIP_BUFFERS 1
- typedef struct _GstImageInfo GstImageInfo;
- struct _GstImageInfo
- {
- gulong id;
- int demo;
- int dumpvideo;
- void (*free_info) (GstImageInfo * info);
- };
-
-
- typedef struct _GstImageData GstImageData;
- struct _GstImageData
- {
- gint size;
- gchar *data;
- };
-
- typedef struct _GstImageConnection GstImageConnection;
- struct _GstImageConnection
- {
- void (*open_conn) (GstImageConnection * conn, GstImageInfo * info);
- void (*close_conn) (GstImageConnection * conn, GstImageInfo * info);
- void (*free_conn) (GstImageConnection * conn);
- };
-
- typedef GstCaps *(*GstImagePluginGetCapsFunc) (GstImageInfo * info);
- typedef GstImageConnection *(*GstImagePluginSetCapsFunc) (GstImageInfo * info,
- GstCaps * caps);
- typedef GstImageData *(*GstImagePluginGetImageFunc) (GstImageInfo * info,
- GstImageConnection * conn);
- typedef void (*GstImagePluginPutImageFunc) (GstImageInfo * info,
- GstImageData * image);
- typedef void (*GstImagePluginFreeImageFunc) (GstImageData * image);
-
- typedef struct _GstImagePlugin GstImagePlugin;
- struct _GstImagePlugin
- {
- GstImagePluginGetCapsFunc get_caps;
- GstImagePluginSetCapsFunc set_caps;
- GstImagePluginGetImageFunc get_image;
- GstImagePluginPutImageFunc put_image;
- GstImagePluginFreeImageFunc free_image;
- };
-
- typedef struct _GstGLImageInfo GstGLImageInfo;
+typedef struct _GstImageInfo GstImageInfo;
+struct _GstImageInfo {
+ gulong id;
+ int demo;
+ int dumpvideo;
+ void (*free_info) (GstImageInfo *info);
+};
+
+
+typedef struct _GstImageData GstImageData;
+struct _GstImageData {
+ gint size;
+ gchar *data;
+};
+
+typedef struct _GstImageConnection GstImageConnection;
+struct _GstImageConnection {
+ void (*open_conn) (GstImageConnection *conn, GstImageInfo *info);
+ void (*close_conn) (GstImageConnection *conn, GstImageInfo *info);
+ void (*free_conn) (GstImageConnection *conn);
+};
+
+typedef GstCaps * (*GstImagePluginGetCapsFunc) (GstImageInfo *info);
+typedef GstImageConnection * (*GstImagePluginSetCapsFunc) (GstImageInfo *info, GstCaps *caps);
+typedef GstImageData* (*GstImagePluginGetImageFunc) (GstImageInfo *info, GstImageConnection *conn);
+typedef void (*GstImagePluginPutImageFunc) (GstImageInfo *info, GstImageData *image);
+typedef void (*GstImagePluginFreeImageFunc) (GstImageData *image);
+
+typedef struct _GstImagePlugin GstImagePlugin;
+struct _GstImagePlugin {
+ GstImagePluginGetCapsFunc get_caps;
+ GstImagePluginSetCapsFunc set_caps;
+ GstImagePluginGetImageFunc get_image;
+ GstImagePluginPutImageFunc put_image;
+ GstImagePluginFreeImageFunc free_image;
+};
+
+typedef struct _GstGLImageInfo GstGLImageInfo;
/* stuff about our window grouped together */
- struct _GstGLImageInfo
- {
- GstImageInfo info;
- Display *dpy;
- int screen;
- Window win;
- GLXContext ctx;
- XSetWindowAttributes attr;
- Bool fs;
- //XF86VidModeModeInfo deskMode;
- int x, y;
- unsigned int width, height;
- unsigned int depth;
- /* window specific from here */
- GstElement *sink;
- gulong handler_id;
- float rotX, rotY, zoom, zoomdir;
- };
+struct _GstGLImageInfo {
+ GstImageInfo info;
+ Display *dpy;
+ int screen;
+ Window win;
+ GLXContext ctx;
+ XSetWindowAttributes attr;
+ Bool fs;
+ //XF86VidModeModeInfo deskMode;
+ int x, y;
+ unsigned int width, height;
+ unsigned int depth;
+ /* window specific from here */
+ GstElement *sink;
+ gulong handler_id;
+ float rotX,rotY,zoom, zoomdir;
+};
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_VIDEOSINK_H__ */
+#endif /* __GST_VIDEOSINK_H__ */